V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
爱意满满的作品展示区。
gleport

又一个 Linux 下重定向应用程序的 TCP/UDP 流量的工具

  •  
  •   gleport · May 18, 2023 · 2221 views
    This topic created in 1078 days ago, the information mentioned may be changed or developed.

    在一个容器网络工具 passt 上做了一点微小的工作,增加了 --proxy--dns-redirect 等选项,功能和 proxychains / graftcp / nsproxy 类似。使用示例如下:

    ./pasta --proxy="127.0.0.1:7890" --proxy-type=http wget https://example.com
    

    --proxy-type 为 socks5 类型时支持 UDP:

    ./pasta --proxy="127.0.0.1:7890" --proxy-type=socks5 uip
    

    上面的 uip 工具可以测试 UDP 转发。

    如需指定 DNS 可以使用 --dns-redirect 选项:

    ./pasta --dns-redirect="1.1.1.1" --proxy="127.0.0.1:7890" bash
    

    定位问题可加上 -d 打印详细日志。

    https://github.com/hmgle/passt

    2 replies    2026-01-21 09:52:20 +08:00
    wzyuliyang
        1
    wzyuliyang  
       Jan 11
    ➜ passt git:(proxy-dev) ./passt --dns-redirect="10.251.240.44" --proxy="10.251.240.44:7890" --proxy-type=socks5 wget www.google.com
    Don't run as root. Changing to nobody...
    Extra non-option argument: wget
    ➜ passt git:(proxy-dev) ./passt --dns-redirect="10.251.240.44" --proxy="10.251.240.44:7890" --proxy-type=socks5 wget www.google.com


    为啥报 Extra non-option argument: wget 是有啥更新了么
    gleport
        2
    gleport  
    OP
       Jan 21
    是 pasta 而不是 passt
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1010 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 23:26 · PVG 07:26 · LAX 16:26 · JFK 19:26
    ♥ Do have faith in what you're doing.