logo NodeSeekbeta

Linux 下单独令应用程序走代理的工具 nsproxy

https://github.com/nlzy/nsproxy

nsproxy - namespace proxy

A command-line tool that force applications to use a specific SOCKS5 or HTTP proxy.

功能和 tsocks / proxychains / graftcp 类似,但是实现原理大不相同。

支持 UDP ,而且对静态编译的程序支持良好,不需要使用 root 权限,也不需要侵入应用程序内部。

可以使用 socks5 和 http 协议。

这个程序就是为了解决 proxychains 和 tsocks 的两个问题:

  • 一是不能用在静态编译的程序上
  • 二是不支持 UDP
  • 今天逛v2ex也看到这个了,看起来这软件挺实用的

    我之前用的都是graftcp,效果非常优秀,有时间测试一下这个

    一些细节:proxychains是通过拦截动态库实现的,对于go语言编译的程序不起作用,graftcp可以起作用,nsproxy 从原理来看应该也是有效的。

  • @-X- #1

    using a totally different mechanism. It create a TUN device and launch applications in a fresh network_namespace, then connect the TUN device to a usermode TCP/IP stack and redirect connections through proxy server outside the namespace. Benefit from namespace mechanism, it doesn't require any privilege, and will not affect other processes.

    主要是用了 network namespace

  • @zxxx #2
    嗯是的,这个是更加完美一点的idea,可能对一些2.x的内核不适用,部分openvz6的机器可能用不了

  • 不错 值得收藏啊 xhj001

  • 支持支持!

  • 进化版啊我去

你好啊,陌生人!

我的朋友,看起来你是新来的,如果想参与到讨论中,点击下面的按钮!

📈用户数目📈

目前论坛共有14693位seeker

🎉欢迎新用户🎉