diff --git a/datafile_gen_daemon_conf.py b/datafile_gen_daemon_conf.py index bab6baa04b76c8c6293df1a9d49c54d770eb4253..e56904df3e7c5ceebd56af33821fbde47dc1f693 100644 --- a/datafile_gen_daemon_conf.py +++ b/datafile_gen_daemon_conf.py @@ -3,7 +3,9 @@ tests = [ ('./do.bash rproxy', 'Reverse Proxy'), ('./do.bash drive', 'Drive'), - ('./do.bash ss-tw', 'ShadowSocks taiwan'), + ('./do.bash ssr-tw', 'ShadowSocksR taiwan'), + ('./do.bash ssr-hk', 'ShadowSocksR HongKong'), + ('./do.bash frp-hk', 'FRPS HongKong'), ('./do.bash ss-us1', 'ShadowSocks US-1'), ('./do.bash ss-us5', 'ShadowSocks US-5'), ('./do.bash ss-us6', 'ShadowSocks US-6'), diff --git a/do.bash b/do.bash index fa34d5927032950ea290e2f318e9ad29d8189860..c7ca88d9d2aaa6824772af7f24de927c54f7ee40 100755 --- a/do.bash +++ b/do.bash @@ -1,6 +1,6 @@ #!/bin/bash -[[ $1 == '' ]] && echo -e 'Usage: '"$0 <operation> ...\n operation := rproxy | drive | ss-tw | ss-us1 | ss-us5 | ss-us6 | ovpn-tw | www | mail | tm | git | zhixiang | mc | push-httpdb-agent | ddns-wuhan | rocket | dl | shortlink | all" && exit 1 +[[ $1 == '' ]] && echo -e 'Usage: '"$0 <operation> ...\n operation := rproxy | drive | ssr-tw | ssr-hk | frp-hk | ss-us1 | ss-us5 | ss-us6 | ovpn-tw | www | mail | tm | git | zhixiang | mc | push-httpdb-agent | ddns-wuhan | rocket | dl | shortlink | all" && exit 1 function confirm_alive () { local host="$1" @@ -39,11 +39,16 @@ function do_test () { ;; drive ) confirm_alive drive.recolic.net && - curl -s https://drive.recolic.net/index.php/login | grep 'submit-wrapper' || return $? + curl -s https://drive.recolic.net:444/index.php/login | grep 'submit-wrapper' || return $? ;; - ss-tw ) - confirm_alive nohsts.tw1.recolic.org && - test_ss base.tw1.recolic.net || return $? + ssr-tw ) + test_tcp base.tw1.recolic.net 465 || return $? + ;; + ssr-hk ) + test_tcp base.hk1.recolic.net 467 || return $? + ;; + frp-hk ) + test_tcp base.hk1.recolic.net 30999 || return $? ;; ss-us1 ) test_ss base.us1.recolic.net || return $? @@ -140,7 +145,7 @@ function do_test () { ;; rocket ) confirm_alive rocket.recolic.net && - curl -s https://rocket.recolic.net/api/info | grep 'success":true' || return $? + curl -s https://rocket.recolic.net:444/api/info | grep 'success":true' || return $? ;; esac } @@ -153,7 +158,9 @@ function do_test_twice () { if [[ "$1" = all ]]; then do_test_twice rproxy && do_test_twice drive && - do_test_twice ss-tw && + do_test_twice ssr-tw && + do_test_twice ssr-hk && + do_test_twice frp-hk && do_test_twice ss-us1 && do_test_twice ss-us5 && do_test_twice ss-us6 &&