SocksTunnel
Establish secure tunnel via Socks 5 base on EventMachine. Recently support TCP only.
Installation
$ gem install socks_tunnel
Usage
Start local server
socks_tunnel local --password=PASSWORD --port=PORT --remote-addr=REMOTE_ADDR
Options
--port | The port number to listen. | Required |
--password | The password for generating encryption key and iv. | Required |
--remote-addr | The address of remote server. (host:port) | Required |
--host | When running local server on a different machine, use this to set the IP. | Optional |
--salt | The salt for generating encryption key and iv. | Optional |
--daemon | Run in the background. | Optional |
Start remote server
socks_tunnel remote --password=PASSWORD --port=PORT
Options
--port | The port number to listen. | Required |
--password | The password for generating encryption key and iv. | Required |
--salt | The salt for generating encryption key and iv. | Optional |
--daemon | Run in the background. | Optional |
Password and Salt used in both local and remote server should be the same.
Example
Test on local machine
# Start local server
socks_tunnel local --password=mypassword --port=8081 --remote-addr=127.0.0.1:8082
# Start remote server
socks_tunnel remote --password=mypassword --port=8082
# Use curl to test
curl --socks5 localhost:8081 https://github.com/
Run Remote server on a real server
# Start local server
socks_tunnel local --password=mypassword --port=8081 --remote-addr=[SERVER_IP]:8082
# Start remote server
socks_tunnel remote --password=mypassword --port=8082
# Use curl to test
curl --socks5 localhost:8081 https://github.com/