sshuttle | Transparent proxy server that works as a poor man | DNS library

 by   sshuttle Python Version: 1.1.1 License: LGPL-2.1

kandi X-RAY | sshuttle Summary

kandi X-RAY | sshuttle Summary

sshuttle is a Python library typically used in Networking, DNS applications. sshuttle has no bugs, it has no vulnerabilities, it has build file available, it has a Weak Copyleft License and it has medium support. You can install using 'pip install sshuttle' or download it from GitHub, PyPI.

Transparent proxy server that works as a poor man's VPN. Forwards over ssh. Doesn't require admin. Works with Linux and MacOS. Supports DNS tunneling.

            kandi-support Support

              sshuttle has a medium active ecosystem.
              It has 9973 star(s) with 658 fork(s). There are 137 watchers for this library.
              It had no major release in the last 12 months.
              There are 158 open issues and 301 have been closed. On average issues are closed in 95 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of sshuttle is 1.1.1

            kandi-Quality Quality

              sshuttle has 0 bugs and 0 code smells.

            kandi-Security Security

              sshuttle has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              sshuttle code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              sshuttle is licensed under the LGPL-2.1 License. This license is Weak Copyleft.
              Weak Copyleft licenses have some restrictions, but you can use them in commercial projects.

            kandi-Reuse Reuse

              sshuttle releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              sshuttle saves you 2598 person hours of effort in developing the same functionality from scratch.
              It has 5565 lines of code, 333 functions and 34 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed sshuttle and discovered the below as its top functions. This is intended to give you an instant insight into sshuttle implemented functionality, and help decide if they suit your requirements.
            • Setup the firewall
            • Helper function to set a value in the system
            • Convert family to string
            • Log a string
            • Main function for hostwatch
            • Enqueue an operation
            • Check if stdin is still available
            • Called when a connection is received
            • Return a list of nameservers for the nameserver
            • Handle incoming TCP packets
            • Creates a new IPv6 socket
            • Return the names of the names of the nameserver
            • Return family IP address
            • Pre - select pairs
            • Run netstat
            • Start hostwatch
            • Check for hosts on remote host
            • Get family IP address
            • Handle incoming UDP packets
            • Query the TCP port for the TCP port
            • Receive a UDP packet
            • Start the router
            • Create a new daemon process
            • Flush the DNS resolver cache
            • Check if ssh is running
            • Parse IP address
            • Bind to the socket
            • Run one or more handlers
            • Rewrite hosts
            Get all kandi verified functions for this library.

            sshuttle Key Features

            No Key Features are available at this moment for sshuttle.

            sshuttle Examples and Code Snippets

            sshuttle server for Docker,Example kubernetes deployment
            Shelldot img1Lines of Code : 70dot img1no licencesLicense : No License
            copy iconCopy
            apiVersion: v1
            kind: Secret
              name: sshuttle
              namespace: sshuttle
            type: Opaque
              ecdsakey: [base64-encoded key]
              ed25519key: [base64-encoded key]
              rsakey: [base64-encoded key]
            apiVersion: v1
            kind: ConfigMap
              name: s  
            DO-sshuttle,Installation,5. Start Proxying.
            Shelldot img2Lines of Code : 11dot img2License : Non-SPDX (NOASSERTION)
            copy iconCopy
            $ ./do-sshuttle
            do-shuttle v0.0.1
            Fatih Kadir Akın 
            Transparent Proxying over DigitalOcean Droplets
            [ds] <--- Getting do-sshuttle-server Droplet information...
            [ds] ---> Powering on do-sshuttle-server (root@) Droplet...
            [ds] ---> Power-on R  
            Shelldot img3Lines of Code : 8dot img3License : Permissive (MIT)
            copy iconCopy
            # See all sshuttle options
            sshuttle --help
            # Run sshuttle
            sshuttle --remote username@sshserver --ssh-cmd 'ssh -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null' 0/0
            # client: Connected.
            Problem while installing virtualenvwrapper with pyenv + pipx
            Pythondot img4Lines of Code : 4dot img4License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            export WORKON_HOME=$HOME/.virtualenvs
            export VIRTUALENVWRAPPER_PYTHON=/Users/my_user/.local/pipx/venvs/virtualenvwrapper/bin/python3.8
            source /Users/my_user/.local/pipx/venvs/virtualenvwrapper/bin/
            Brew - reinstalling python@2
            Pythondot img5Lines of Code : 2dot img5License : Strong Copyleft (CC BY-SA 4.0)
            copy iconCopy
            brew install

            Community Discussions


            Using expect on stderr (sshuttle as an example)
            Asked 2022-Mar-10 at 15:46

            There is this program called sshuttle that can connects to a server and create a tunnel.

            I wish to create a bash function that sequentially:

              1. opens a tunnel to a remote server (sshuttle -r myhost 0/0),
              1. performs 1 arbitrary commandline,
              1. kill -s TERM .

            A basic idea (that works but the 5 seconds delay is a problem) is like sshuttle -r myhost 0/0 & ; sleep 5 ; mycommand ; kill -s TERM $(pgrep sshuttle)

            Could expect be used to expect the string "c : Connected to server." that is received from stderr here? My attempts as a newbie were met with nothing but failure, and the man page is quite impressive.



            Answered 2022-Mar-10 at 15:46

            When you use expect to control another program, it connects to that program through a pseudo-terminal (pty), so expect sees the same output from the program as you would on a terminal, in particular there is no distinction between stdout and stderr. Assuming that your mycommand is to be executed on the local machine, you could use something like this as an expect (not bash) script:



            Docker SSH-Key looking for a simple solution
            Asked 2020-Oct-21 at 18:08

            I'm trying to copy my ssh-keys into my docker, it's a very simple docker including some LinuxTools via Package Manager. A asking because, I can't come up with a simple solution ADD/COPY seem not to work, using docker-volume or compose seem to be over the top. Please advice.



            Answered 2020-Oct-21 at 18:08

            You can't copy files into a docker container that live outside of the build directory. This is for security reasons. What you'll need to do is first copy your id_rsa file into the same directory as your Dockerfile, and then change the ADD to use the copy you just made, instead of trying to copy it from the absolute path that it is currently using.

            I would also suggest changing the ADD to COPY, as it is easier to work with and has less unexpected behavior to trip over.

            so at your command line:



            How to Use sshuttle on Windows WSL2
            Asked 2020-Jun-09 at 07:06

            We have a Jenkins server which is accessible only from within the VPC on the cloud. On Mac and Linux I use sshuttle to make a ssh connection to the bastion instance (to act a proxy) and open the Jenkins console in the browser. Everything works fine.
            Now I'm on Windows and trying to do the same on WSL2. If I'm not mistaken previously, sshuttle didn't work on WSL1 (failed with some error message), but I managed to run it on WSL2 without any issue. The ssh connection is established and I can access my Jenkins (using curl).
            Then I tried to access my Jenkins on Windows via WSL2:
            1. I found the IP address of WSL2 and the port the ssh tunnle:



            Answered 2020-Jun-09 at 07:06

            I'm not sure, but my guess is that sshuttle doesn't actually act as a SOCKS proxy and that's why the connection gets reset.
            I managed to access my Jenkins on Windows machine using ssh SOCKS proxy: ssh -D rad@bastion and configured Firefox to use the SOCKS proxy.
            Interestingly, for this you don't even need WSL. It seems Windows 10 has OpenSSH and you can use it. Just open CMD and type ssh -D 1080 rad@bastion and setup Firefox to use localhost as the proxy.
            If there's any better solution or any comment/concern (apart from DNS over SOCKS) with this approach, please share.



            install sshuttle in a Google sdk docker image
            Asked 2020-Apr-02 at 16:34

            I am struggling to build this baby Dockerfile:



            Answered 2020-Apr-02 at 14:34

            Your Docker DNS could be breaking index file resolution. Try using docker build --network=host



            Brew - reinstalling python@2
            Asked 2020-Mar-06 at 17:51

            I have been having issues with openssl and python@2 with brew, which have explained here (unresolved). The documented workaround to reinstall Python and openssl was not working, so I decided I would uninstall and reinstall Python.

            The problem is, when you try to install Python 2 with brew, you receive this message:



            Answered 2020-Mar-06 at 17:51

            It seems that the homebrew staff really makes it as hard as possible to use Python 2.7 on macOS as they can.

            1. The linked brew extract link is really not helpful, you need to look for answers here about how to make your own tap from extracted sources.
            2. The linked commit: 028f11f9e is wrong, as it contains the already deleted file.
            3. The brew extract command doesn't even work correctly, because of the @ in the package name.

            The solution is very simple though, you just need to install from the latest known commit:



            use kafka connect mongoDB debezium souce connector on a remote MSK kafka cluster
            Asked 2020-Jan-31 at 13:49

            I want to read data from MongoDB into Kafka's topic. I managed to get this work locally by using the following connector properties file:



            Answered 2020-Jan-31 at 13:49

            It's recommended to use connect-distributed script and properties for running Connect/Debezium

            Anything that says zookeeper.connect should be removed (only Kafka brokers use that). Anything that says bootstrap servers should point at the address MSK gives you.

            If you're getting connection errors, make sure you check firewall / VPC settings


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install sshuttle

            You can install using 'pip install sshuttle' or download it from GitHub, PyPI.
            You can use sshuttle like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
          • PyPI

            pip install sshuttle

          • CLONE
          • HTTPS


          • CLI

            gh repo clone sshuttle/sshuttle

          • sshUrl


          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Reuse Pre-built Kits with sshuttle

            Consider Popular DNS Libraries


            by AdguardTeam


            by coredns


            by fanux


            by sshuttle


            by miekg

            Try Top Libraries by sshuttle


            by sshuttleRust