Skip to content

Commit

Permalink
Revert "allow_free test"
Browse files Browse the repository at this point in the history
This reverts commit 4ecf3b2.
  • Loading branch information
kkkgo committed May 27, 2024
1 parent 4ecf3b2 commit 3260bbe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
8 changes: 1 addition & 7 deletions FILES/usr/bin/ppg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,6 @@ load_clash() {
if [ -z "$clash_web_password" ]; then
clash_web_password="clashpass"
fi
if [ "$allow_free" = "yes" ]; then
append_direct=yes
else
append_direct=no
fi
export append_direct
sed "s|https://www.youtube.com/generate_204|$test_node_url|g" /etc/config/clash/clash-dashboard/index_base.html >/etc/config/clash/clash-dashboard/index.html
closeall_flag="yes"
log "[VERSION] :""$(clash -v)" succ
Expand Down Expand Up @@ -341,7 +335,7 @@ load_ovpn() {
gen_hash() {
if [ -f /tmp/ppgw.ini ]; then
. /tmp/ppgw.ini 2>/dev/tty0
str="ppgw""$fake_cidr""$dns_ip""$dns_port""$openport""$sleeptime""$clash_web_port""$clash_web_password""$mode""$udp_enable""$socks5_ip""$socks5_port""$ovpnfile""$ovpn_username""$ovpn_password""$yamlfile""$suburl""$subtime""$fast_node""$test_node_url""$ext_node""$cpudelay""$dns_burn""$ex_dns""$net_rec""$max_rec""$allow_free"
str="ppgw""$fake_cidr""$dns_ip""$dns_port""$openport""$sleeptime""$clash_web_port""$clash_web_password""$mode""$udp_enable""$socks5_ip""$socks5_port""$ovpnfile""$ovpn_username""$ovpn_password""$yamlfile""$suburl""$subtime""$fast_node""$test_node_url""$ext_node""$cpudelay""$dns_burn""$ex_dns""$net_rec""$max_rec"
echo "$str" | md5sum | grep -Eo "[a-z0-9]{32}" | head -1
else
echo "INI does not exist"
Expand Down
6 changes: 1 addition & 5 deletions ppgw.go
Original file line number Diff line number Diff line change
Expand Up @@ -974,11 +974,7 @@ func filterNodes(nodes []ClashNode, excludedNodes []string) []ClashNode {
}

func isSystemNode(nodeName string) bool {
systemNodes := []string{"REJECT", "GLOBAL", "UNKNOWN"}
append_direct := os.Getenv("append_direct")
if append_direct != "yes" {
systemNodes = append(systemNodes, "DIRECT")
}
systemNodes := []string{"REJECT", "DIRECT", "GLOBAL", "UNKNOWN"}
nodeName = strings.ToUpper(nodeName)
for _, sysNode := range systemNodes {
if nodeName == sysNode {
Expand Down

0 comments on commit 3260bbe

Please sign in to comment.