Skip to content

Commit

Permalink
fix: fakesni bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed Jul 28, 2024
1 parent 13d88ec commit d0895ba
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions haproxy/common.cfg.pj2
Original file line number Diff line number Diff line change
Expand Up @@ -58,38 +58,38 @@ frontend https-in
use_backend to_https_in_ssl if is_cdn

{%for d in domain if d['mode']=='sub_link_only'%}
use_backend to_panel_only if { hdr(host) -i {{d['domain']}} }
use_backend to_panel_only if { req.ssl_sni -i {{d['domain']}} }
{%endfor%}

{% for d in domains if d['internal_port_reality'] and d['grpc'] %}
{%set domain=d['domain']%}
{%set port=d['internal_port_reality']%}
use_backend reality_grpc_{{port}} if { hdr(host) -i {{domain}} }
use_backend reality_grpc_{{port}} if { req.ssl_sni -i {{domain}} }
{%endfor%}

{% for d in domains if d['internal_port_reality'] and not d['grpc'] %}
{%set domain=d['domain']%}
{%set port=d['internal_port_reality']%}
use_backend reality_{{port}} if { hdr(host) -i {{domain}} }
use_backend reality_{{port}} if { req.ssl_sni -i {{domain}} }
{%endfor%}



{%if hconfigs['ssfaketls_enable'] and hconfigs['ssfaketls_fakedomain'] %}
use_backend ssfake if { hdr(host) -i {{hconfigs['ssfaketls_fakedomain']}} }
use_backend ssfake if { req.ssl_sni -i {{hconfigs['ssfaketls_fakedomain']}} }
{%endif%}


{%if hconfigs['telegram_enable'] and hconfigs['telegram_fakedomain'] %}
use_backend telegram if { hdr(host) -i {{hconfigs['telegram_fakedomain']}} }
use_backend telegram if { req.ssl_sni -i {{hconfigs['telegram_fakedomain']}} }
{%endif%}

{%if hconfigs['shadowtls_enable'] and hconfigs['shadowtls_fakedomain']%}
use_backend shadowtls if { hdr(host) -i {{hconfigs['shadowtls_fakedomain'] }} }
use_backend shadowtls if { req.ssl_sni -i {{hconfigs['shadowtls_fakedomain'] }} }
{%endif%}

{% for d in domains if d['mode']=='old_xtls_direct' %}
use_backend xray_force if { hdr(host) -i {{d['domain']}} }
use_backend xray_force if { req.ssl_sni -i {{d['domain']}} }
{%endfor%}

#use_backend to_https_in_ssl_h2 if alpnh2
Expand Down
1 change: 1 addition & 0 deletions other/ssfaketls/disable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ systemctl disable --now ss-faketls.service > /dev/null 2>&1

systemctl disable --now hiddify-ss-v2ray.service > /dev/null 2>&1
systemctl disable --now hiddify-ss-faketls.service > /dev/null 2>&1
rm ss-faketls.service*
1 change: 1 addition & 0 deletions other/ssfaketls/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ install_package shadowsocks-libev simple-obfs

ln -sf $(pwd)/hiddify-ss-faketls.service /etc/systemd/system/hiddify-ss-faketls.service
systemctl disable --now ss-faketls.service
rm ss-faketls.service*

0 comments on commit d0895ba

Please sign in to comment.