推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
Themyth
V2EX  ›  Python

有没有一种端口转发工具,是可以同时转发给多个端口/服务器的?

  •  
  •   Themyth · Apr 5, 2019 · 6908 views
    This topic created in 2777 days ago, the information mentioned may be changed or developed.

    有没有一种 Port forwarding 工具 可以将本地某端口的数据,同时给多个目标服务器和端口转发的? 并且哪个快就用哪个建立连接.. udp 下有 mptunnel https://github.com/greensea/mptunnel

    CONCEPTION
    
                            .---- bridge server 1 ----.
                           /                            \
     Server A --- mpclient ------- bridge server 2 ------- mpserver --- Server B
                           \                            /
                            `---- bridge server 3 ----`
    

    tcp 下有类似的吗.... 只是端口转发,并不使用 vpn 的方式... vpn 的方式有很多解决办法了...

    22 replies  •  2019-04-06 18:41:31 +08:00
    Themyth
    Themyth
    OP
    Apr 5, 2019
    1
    复制的歪了……
    www5070504
    www5070504
    Apr 5, 2019
    2
    没太看懂 说的是 LVS 么
    Dragonish3600
    Dragonish3600
    Apr 5, 2019 via iPhone
    3
    Nginx 就可以啊
    Livid
    Livid
    MOD
    PRO
    Apr 5, 2019❤️1
    4
    @Themyth 帮你修改了一下,发帖时选 Markdown 并且用 code block 语法就可以保持格式。
    iceheart
    iceheart
    Apr 5, 2019 via Android
    5
    http 代理
    binux
    binux
    Apr 5, 2019 via Android
    6
    iptables 加条规则就行了啊
    Themyth
    Themyth
    OP
    Apr 5, 2019
    7
    @www5070504 额 不是 lvs lvs 并不是同时的。


    @ladypxy nginx 可以将数据包同时给多个 upstream 发送? 怎么实现的呢?或者告诉我关键字 我去查查


    @Livid 谢谢哈
    @iceheart socks5 代理 有朋友实现了 可是我需要的是端口转发类型的
    @binux 老大,能告诉我加什么规则么?给我个关键字 我去查查...
    9hills
    9hills
    Apr 5, 2019 via iPhone
    8
    HAProxy 用的比较普遍
    binux
    binux
    Apr 5, 2019
    9
    @Themyth #7 TCP 是流协议,哪来的数据包给你「同时发送」

    random DNAT
    csdreamdong
    csdreamdong
    Apr 5, 2019
    10
    openvswitch,用 openflow 的流表,向多个端口转
    iwishing
    iwishing
    Apr 5, 2019
    11
    这个不是传说中的负载平衡么?
    towser
    towser
    Apr 5, 2019 via iPhone
    12
    不是负载平衡。
    楼主希望做到的是得到数据后复制多份并发给多个不同的 dst port
    belongme
    belongme
    Apr 5, 2019
    13
    请求都是一样的,那返回的数据用哪个端口的。
    www5070504
    www5070504
    Apr 5, 2019
    14
    用交换机的流量镜像功能 或者 自己撸一个复制数据发送到多个地址的小程序

    ovs 的流表肯定可以 我现在业务里边有这个类似的功能是用流表实现的
    Actrace
    Actrace
    Apr 5, 2019
    15
    这不就是多倍发包么。。。
    ICKelin
    ICKelin
    Apr 5, 2019
    16
    @www5070504 数据包回来怎么办,出去是复制多份发往多个目的地址了。
    ashong
    ashong
    Apr 5, 2019 via iPhone
    18
    haproxy,gobetween

    最近用 gobetween 替换了 haproxy,体验提升不少
    yanaraika
    yanaraika
    Apr 6, 2019 via Android
    19
    iptables -j TEE
    saxon
    saxon
    Apr 6, 2019
    20
    @ashong 请教一下 gobetween 功能是?
    learningman
    learningman
    Apr 6, 2019
    21
    这不是广播吗。。。。
    zh99998
    zh99998
    Apr 6, 2019
    22
    haproxy
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2633 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 54ms · UTC 04:31 · PVG 12:31 · LAX 20:31 · JFK 23:31
    ♥ Do have faith in what you're doing.