Node.js server supporting SOCKS5 protocol
- call support
You can use either
npm
oryarn
to follow the instructions
- Download Git repo:
git clone https://github.com/Beraliv/socks5-server
- Download dependencies:
npm i
yarn
- Start the server simply:
npm run start
yarn start
You need to configure both server and client
- Sign up to AWS (you can connect your card for $1 for the first year)
- Console > EC2 Dashboard > Launch instance
- Ubuntu Server 16.04 LTS (HVM), SSD Volume Type > Select
- t2.micro (Free tier eligible) > Next: Configure Instance Details
- Next: Add Storage
- Set Size (GiB) to
30
(maximum free available) > Next: Add Tags - Next: Configure Security
- Add Type
Custom TCP Rule
with Port1080
and SouceCustom
with0.0.0.0/0
for SOCKS5 > Review and Launch - Launch > Create a new key pair with Key pair name, i.e.
aws-keys
> Download Key Pair (it will download a private key with specified name, i.e.aws-keys.pem
) > Launch Instances
- Install PuTTY
- Install WinSCP
- WinSCP > Fill Host name with
IPv4 Public IP
fromInstances
in AWS Dashboard > Fill Port number with22
for SSH > Fill User name with default for AWSubuntu
- Advanced > SSH > Authentication > Private key file > All private Keys Files > Choose
aws-keys.pem
> OK (convert to.ppk
) > OK (Close Advanced Site Settings) - Save > Login
- Use
Ctrl + P
for console
- From Quick Start download git repo and dependencies
- Go to services directory with
cd /etc/systemd/system
- Create service for the server with
sudo touch s5ts.service
- Give write permissions to all users to the file with
sudo chmod 777 s5ts.service
andsudo chown ubuntu s5ts.service
- Open file with Vim using
vim s5ts.service
- Insert (with right button of the mouse)
[Unit]
Description=Node server which supports SOCKS5 protocol
After=network.target
[Service]
ExecStart=/home/ubuntu/socks5-server/index.js
Restart=always
User=ubuntu
Group=nogroup
Environment=PATH=/usr/bin:/usr/local/bin
Environment=NODE_ENV=production
WorkingDirectory=/home/ubuntu/socks5-server
[Install]
WantedBy=multi-user.target
Note RHEL/Fedora uses 'nobody', Debian/Ubuntu uses 'nogroup' as Group
Esc
+:wq!
will save and exit from Vim- To access
index.js
from created service, you need to addsudo chmod 777 index.js
andsudo chown ubuntu index.js
toExecStart
file - Make systemd aware of the new service with
sudo systemctl daemon-reload
- Make the service start on boot with
sudo systemctl enable s5ts
- To check logs in real time using
sudo journalctl --follow -u s5ts
- To restart service use
sudo systemctl restart s5ts
- Find and open
C:\Windows\System32\drivers\etc\hosts
- Add a new line at the end:
$YOUR_IP_HERE$ $NAME$
, i.e.173.21.33.95 s5ts.local
- Connect using specified settings:
or