frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet. As of now, it supports tcp & udp, as well as http and https protocols, where requests can be forwarded to internal services by domain name.
quote:
https://github.com/fatedier/frp
// arg1: config path
// arg2: frp salt(default frp)
extern void FrpClientFrpc_main(NSString* cfgFile, NSString* salt);
// e.g.:
FrpClientFrpc_main(@"app/config.ini", @"frp");
# frpc.ini
[common]
server_addr = x.x.x.x(server ip)
server_port = 7000(server port)
[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000(remote ssh port)
use
ssh root@x.x.x.x -p 6000
to connect.