-
Notifications
You must be signed in to change notification settings - Fork 57
USAGE.en_US
gwind edited this page Feb 12, 2017
·
2 revisions
- suppose the server address is
example.com
- the client can connect to server
Note a single otunnel program can run as server or client.
./otunnel listen :10000 -s longlongsecret
e.g:There is a 192.168.1.3:22
in client's local network, we want mapping it on server's port 22.
./otunnel connect example.com:10000 \
-s longlongsecret -t 'r:192.168.1.3:22::10022'
Now, if we connect example.com:10022
, it is equal to connect 192.168.1.3:22
at client side!
e.g: There is a 127.0.0.1:3128
in example.com (server), run command at client:
./otunnel connect example.com:10000 \
-s longlongsecret -t 'f::20080:127.0.0.1:3128'
Now, any program in client, can access 127.0.0.1:20080
, it is equal to access the 127.0.0.1:3128
at example.com (server).
Contain multi components which sperated by :
.
ProxyType:LocalAddr:LocalPort:RemoteAddr:RemotePort
Name | Desc |
---|---|
ProxyType | r is a reverse proxy; f is a forward proxy |
LocalAddr | IP or domain |
LocalPort | port number |
RemoteAddr | IP or domain |
RemotePort | port numbe |
Note
- If
LocalAddr
orRemoteAddr
is empty, it means that listen on all interfaces.