Skip to content

Commit

Permalink
v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mon-ius committed Feb 8, 2025
1 parent 56f4373 commit b8b5228
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 42 deletions.
48 changes: 27 additions & 21 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ PROXY_PART=$(cat <<EOF
"type": "hysteria2",
"server": "$X_SERVER",
"server_port": $X_PORT,
"up_mbps": 1000,
"down_mbps": 1000,
"up_mbps": 100,
"down_mbps": 100,
"password": "$X_AUTH",
"connect_timeout": "5s",
"tcp_fast_open": true,
"udp_fragment": true,
"tls": {
"enabled": true,
"server_name": "$X_SERVER",
Expand Down Expand Up @@ -55,22 +56,6 @@ MAIN_PART=$(cat <<EOF
"store_fakeip": true
}
},
"outbounds": [
{
"tag": "direct-out",
"type": "direct",
"udp_fragment": true
},
{
"type": "dns",
"tag": "dns-out"
},
{
"type": "block",
"tag": "block"
},
$PROXY_PART
],
"dns": {
"servers": [
{
Expand All @@ -93,12 +78,25 @@ $PROXY_PART
},
"route": {
"rules": [
{
"inbound": "tp-in",
"action": "sniff",
"sniffer": [
"dns",
"bittorrent",
"http",
"tls",
"quic",
"dtls"
]
},
{
"protocol": "dns",
"outbound": "dns-out"
"action": "hijack-dns"
},
{
"ip_is_private": true,
"action": "route",
"outbound": "direct-out"
},
{
Expand All @@ -113,23 +111,31 @@ $PROXY_PART
"240.0.0.0/4",
"52.80.0.0/16"
],
"action": "route",
"outbound": "direct-out"
}
],
"auto_detect_interface": true,
"final": "Proxy"
},
"outbounds": [
$PROXY_PART,
{
"tag": "direct-out",
"type": "direct",
"udp_fragment": true
}
],
"inbounds": [
{
"type": "tproxy",
"tag": "tp-in",
"listen": "::",
"listen_port": 60091,
"sniff": true,
"udp_fragment": true,
"tcp_fast_open": true,
"tcp_multi_path": false,
"udp_timeout": "5m",
"sniff_override_destination": false,
"domain_strategy": "prefer_ipv4"
}
]
Expand Down
48 changes: 27 additions & 21 deletions pro/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ PROXY_PART=$(cat <<EOF
"type": "hysteria2",
"server": "$X_SERVER",
"server_port": $X_PORT,
"up_mbps": 1000,
"down_mbps": 1000,
"up_mbps": 100,
"down_mbps": 100,
"password": "$X_AUTH",
"connect_timeout": "5s",
"tcp_fast_open": true,
"udp_fragment": true,
"tls": {
"enabled": true,
"server_name": "$X_SERVER",
Expand Down Expand Up @@ -65,22 +66,6 @@ MAIN_PART=$(cat <<EOF
"store_fakeip": true
}
},
"outbounds": [
{
"tag": "direct-out",
"type": "direct",
"udp_fragment": true
},
{
"type": "dns",
"tag": "dns-out"
},
{
"type": "block",
"tag": "block"
},
$PROXY_PART
],
"dns": {
"servers": [
{
Expand All @@ -103,12 +88,25 @@ $PROXY_PART
},
"route": {
"rules": [
{
"inbound": "tp-in",
"action": "sniff",
"sniffer": [
"dns",
"bittorrent",
"http",
"tls",
"quic",
"dtls"
]
},
{
"protocol": "dns",
"outbound": "dns-out"
"action": "hijack-dns"
},
{
"ip_is_private": true,
"action": "route",
"outbound": "direct-out"
},
{
Expand All @@ -123,23 +121,31 @@ $PROXY_PART
"240.0.0.0/4",
"52.80.0.0/16"
],
"action": "route",
"outbound": "direct-out"
}
],
"auto_detect_interface": true,
"final": "Proxy"
},
"outbounds": [
$PROXY_PART,
{
"tag": "direct-out",
"type": "direct",
"udp_fragment": true
}
],
"inbounds": [
{
"type": "tproxy",
"tag": "tp-in",
"listen": "::",
"listen_port": 60091,
"sniff": true,
"udp_fragment": true,
"tcp_fast_open": true,
"tcp_multi_path": false,
"udp_timeout": "5m",
"sniff_override_destination": false,
"domain_strategy": "prefer_ipv4"
}
]
Expand Down

0 comments on commit b8b5228

Please sign in to comment.