Git Product home page Git Product logo

proxy-ns's Introduction

proxy-ns

The project repo is migrated to https://git.ookami.one/cgit/proxy-ns.

proxy-ns is a lightweight(about 100 lines of code) tool to redirect any programs’ traffic to your local socks5 server.

Unlike proxychains (which uses LD_PRELOAD hack), it sets up a vpn(using tun2socks) within a specific linux network namespace, and execute the target program there.

Features

It has several advantages over proxychains:

  • UDP support
  • Works for statically linked programs

Installation

Arch Linux

proxy-ns is available at AUR

Configuration

If you install it through AUR, the config file should be at /etc/proxy-nsd.conf.

You may need to change SOCKS5_PORT

SOCKS5_PORT=1080

DNS=9.9.9.9

# Set DNS_OVER_TCP to 1 to force DNS over TCP
DNS_OVER_TCP=1

Internal

proxy-nsd would create a separate network namespace, and set up VPN there(with badvpn-tun2socks, redirecting VPN traffic to your socks5 server).

proxy-ns execute your target program in the previous created network namespace.

Caveats

Because proxy-ns execute the target program in a separate network namespace, the target program cannot access any service listening on your host network. (such as thoses listening on 127.0.0.1)

Thereby, there are several things to notice:

Local socks5 server

Your local socks5 proxy server needs to listen on 0.0.0.0 (and :: for IPv6),

and your firewall should allow traffic from 192.168.64.1/24 (subnet used by proxy-nsd) to reach the port your proxy server is listening on.

Programs proxy settings

If you use proxy-ns for programs already have proxy settings in effect, the program will probably fail to connect to the network.

Then you should either only use the proxy settings of the program, or only use proxy-ns.

proxy-ns's People

Contributors

okamiw avatar

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.