Git Product home page Git Product logo

proxc's Introduction

proxc

  1. per-process DNS configuration on Linux
  2. per-process proxy configuration on Linux

Configure DNS for Linux command execution

proxc -d <dns-ip> [-d <dns-ip_2>] -c <command and args>

Execute command with the DNS you specify.

It uses bubblewrap to create a mount namespace, in which processes see the DNS you want in a fake /etc/resolv.conf.

It bans in the namespace /var/run/nscd so processes can't use system's DNS cache

Notice: If network status change, NetworkManager or other program may delete /etc/resolv.conf and create a new one. That makes bubblewrap's file binding lost, causing DNS fallback to original system's DNS

So, not suitable for long-time running. If you want long-time running, it's recommend to use static DNS configuration using the following variables in the /etc/sysconfig/network/config:

  • NETCONFIG_DNS_STATIC_SEARCHLIST
  • NETCONFIG_DNS_STATIC_SERVERS
  • NETCONFIG_DNS_FORWARDER

or disable DNS configuration updates via netconfig by setting: NETCONFIG_DNS_POLICY=''

Configure proxy for Linux command execution

proxc -p socks5|socks4|http <proxy_ip> <proxy_port> -c <command and args>

Execute command with proxychains applied without having to edit proxychains.conf . Useful when you just want to run some app temporarily behind a single proxy.

It generates and uses a proxychains.conf in memory.

Notice: proxychains doesn't ensure process must go through the proxy. There can be leaks.

Configure both DNS & proxy

proxc [-d <dns-ip>] [-p socks5|socks4|http <proxy_ip> <proxy_port>]  -c <command and args>

proxc's People

Contributors

garywill avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  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.