Skip to content

tcp port expose

XuXiHai edited this page Oct 28, 2023 · 1 revision

usage

connect default server

npm install -g gwk

client.json

{
    "serverHost":"gank.75cos.com",
    "serverPort":4443,
    "tunnels":{
        "tcp001":{
            "protocol":"tcp",
            "localPort":5000,
            "remotePort":7200
        },
        "tcp002":{
            "protocol":"tcp",
            "localPort":5000,
            "remotePort":7500
        }
    }
}

output

λ ~/github/gank/ main gwk -c client.json               
Starting gwk client with config: client.json

tunnel list:
tcp001          ok: tcp://gank.75cos.com:7200 <=> tcp://127.0.0.1:5000 
tcp002          ok: tcp://gank.75cos.com:7500 <=> tcp://127.0.0.1:5000
Clone this wiki locally