Git Product home page Git Product logo

sockv5er's Introduction

๐Ÿ•ณ๏ธ sockv5er

a tool to create ssh tunnels on demand using the free tier ec2 instances from AWS from any given region

What does it do:

  • Creates a security group with port 22 open to the public ip of the user
  • Creates a private key which will be used to connect to the ec2 instance
  • Creates an ec2 instance which will shut down in 20 minutes if nothing is done.
  • Connects to the ec2 instance and starts a socksv5 proxy using ssh tunnel
  • Once you add the proxy settings for 127.0.01:1337 all your browser traffic will be encrypted and transferred through the tunnel between your system and the ec2 instance.
  • Cleans up the ec2 instance after usage.
  • Subsequent runs of this app will give you option to clean up any existing resources created by this app.

โš™๏ธ Setup

  • Create a new AWS account and set up the access id and secret key
  • Set the below env variables in the system.
ACCESS_KEY_ID="" # AWS Access key ID
SECRET_KEY="" # AWS Access key
SOCKS_V5_PORT=1337 # A free port on your system.
  • Execute sockv5er to start the socksv5 server
  • Add a socksv5 proxy in your browser with the address 127.0.0.1 and port you have as the value for SOCKS_V5_PORT
  • Press CTRL + C to exit.
  • To clean up all the resources, execute sockv5er again and press Y

๐ŸŽŠ Features

  • Creates an EC2 instance in the free tier and starts an SSH tunnel which can be used as socksv5 proxy
  • Terminates the created EC2 instances in 20 minutes after it starts up in case the app crashes
  • Tracks the resources the app creates so that it can be deleted in the subsequent run

๐Ÿ“ TODO

  • Fix the existing test cases and add more coverage
  • Postpone the shutdown of the EC2 instance as long as the ssh tunnel is active
  • Handle the exit from the SSH tunnel in a graceful way
  • Make the readme.md a bit more elaborate
  • Add better log messages and print statements
  • Implement functional options. Ref: https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis

โœ๏ธ Contribute

All contributions are welcome. So raise away your PRs. Here's the contributor guidelines.

Developer Notes

  • Use build.sh to build the app for different platforms

sockv5er's People

Contributors

platput avatar platvin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gaby

sockv5er's Issues

Handle the exit from the SSH tunnel in a graceful way

This is just an idea and it can be improved up on.

The code related to exiting the ssh tunnel is not ideal. Pressing CTRL+C on the user's keyboard should send the shutdown command (shutdown +1)to the ec2 instance and then exit the SSH tunnel. The app should wait until the ec2 instance is terminated as well.

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.