GithubHelp home page GithubHelp logo

beraliv / socks5-server Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 42 KB

Node server with support of SOCKS5 protocol

License: MIT License

JavaScript 100.00%
node socks5 socks-proxy server socks-server

socks5-server's Introduction

socks5-server

Node.js server supporting SOCKS5 protocol

  • call support

Quick start

You can use either npm or yarn to follow the instructions

  1. Download Git repo:
git clone https://github.com/Beraliv/socks5-server
  1. Download dependencies:
npm i

yarn
  1. Start the server simply:
npm run start

yarn start

Configurations

You need to configure both server and client

Create server instance

  1. Sign up to AWS (you can connect your card for $1 for the first year)
  2. Console > EC2 Dashboard > Launch instance
  3. Ubuntu Server 16.04 LTS (HVM), SSD Volume Type > Select
  4. t2.micro (Free tier eligible) > Next: Configure Instance Details
  5. Next: Add Storage
  6. Set Size (GiB) to 30 (maximum free available) > Next: Add Tags
  7. Next: Configure Security
  8. Add Type Custom TCP Rule with Port 1080 and Souce Custom with 0.0.0.0/0 for SOCKS5 > Review and Launch
  9. 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

SSH access (Windows)

  1. Install PuTTY
  2. Install WinSCP
  3. WinSCP > Fill Host name with IPv4 Public IP from Instances in AWS Dashboard > Fill Port number with 22 for SSH > Fill User name with default for AWS ubuntu
  4. Advanced > SSH > Authentication > Private key file > All private Keys Files > Choose aws-keys.pem > OK (convert to .ppk) > OK (Close Advanced Site Settings)
  5. Save > Login
  6. Use Ctrl + P for console

Service

  1. From Quick Start download git repo and dependencies
  2. Go to services directory with cd /etc/systemd/system
  3. Create service for the server with sudo touch s5ts.service
  4. Give write permissions to all users to the file with sudo chmod 777 s5ts.service and sudo chown ubuntu s5ts.service
  5. Open file with Vim using vim s5ts.service
  6. 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

  1. Esc + :wq! will save and exit from Vim
  2. To access index.js from created service, you need to add sudo chmod 777 index.js and sudo chown ubuntu index.js to ExecStart file
  3. Make systemd aware of the new service with sudo systemctl daemon-reload
  4. Make the service start on boot with sudo systemctl enable s5ts

Service setups

  1. To check logs in real time using sudo journalctl --follow -u s5ts
  2. To restart service use sudo systemctl restart s5ts

Windows Client

  1. Find and open C:\Windows\System32\drivers\etc\hosts
  2. Add a new line at the end: $YOUR_IP_HERE$ $NAME$, i.e. 173.21.33.95 s5ts.local
  3. Connect using specified settings:

Connection Type

or

Connection Type (alternative way)

socks5-server's People

Contributors

beraliv avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

nosqd-archive

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.