sbwtw/haproxy-shadowsocks-checker: External HAProxy checker for shadowsocks protocol.
2020-10-05 20:42:25 Author: github.com(查看原文) 阅读量:514 收藏

External HAProxy checker for shadowsocks protocol.

How works

使用 HAProxy 为 Shadowsocks 做负载平衡

Usage

Edit /etc/haproxy/haproxy.cfg, add external-check options.

global
    external-check
...
backend backend_services
    mode        tcp
    balance     roundrobin
    option external-check
    external-check command "/your/path/haproxy-shadowsocks-checker.py"

    server your-server-name 127.0.0.1:8001 check fall 5 rise 2 inter 7s
...

Change Test Domain

The checker is trying to connect www.google.com in default, but you can modify the global variable to other domain if you want.

TEST_DOMAIN = b'www.facebook.com'

Screenshots

Screenshots


文章来源: https://github.com/sbwtw/haproxy-shadowsocks-checker
如有侵权请联系:admin#unsafe.sh