Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
server-monitor
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Recolic
server-monitor
Commits
1c06ffdd
There was an error fetching the commit references. Please try again later.
Commit
1c06ffdd
authored
4 years ago
by
Recolic Keghart
Browse files
Options
Downloads
Patches
Plain Diff
update
parent
5ca6f3db
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
datafile_gen_daemon_conf.py
+5
-8
5 additions, 8 deletions
datafile_gen_daemon_conf.py
do.bash
+20
-39
20 additions, 39 deletions
do.bash
with
25 additions
and
47 deletions
datafile_gen_daemon_conf.py
+
5
−
8
View file @
1c06ffdd
# datafile generator daemon config
tests
=
[
(
'
./do.bash rproxy
'
,
'
Reverse Proxy (
Old SSH
)
'
),
(
'
./do.bash rproxy
'
,
'
Reverse Proxy (
China FRP
)
'
),
(
'
./do.bash drive
'
,
'
Drive
'
),
(
'
./do.bash v-tw
'
,
'
Project V taiwan
'
),
(
'
./do.bash v-hk
'
,
'
Project V HongKong
'
),
(
'
./do.bash frp-hk
'
,
'
Reverse Proxy (HongKong FRP)
'
),
(
'
./do.bash ss-us1
'
,
'
ShadowSocks US-1
'
),
(
'
./do.bash ss-us5
'
,
'
ShadowSocks US-5
'
),
(
'
./do.bash ss-us6
'
,
'
ShadowSocks US-6
'
),
(
'
./do.bash ss-iplc
'
,
'
Shadowsocks IPLC
'
),
# Both CNIP and JPIP, requires linode to be working.
(
'
./do.bash ss-us12
'
,
'
ShadowSocks US-12
'
),
(
'
./do.bash ovpn-tw
'
,
'
OpenVPN taiwan
'
),
(
'
./do.bash www
'
,
'
Main Website
'
),
(
'
./do.bash mail
'
,
'
Mail Server
'
),
...
...
@@ -17,12 +15,11 @@ tests = [
(
'
./do.bash zhixiang
'
,
'
ZhiXiang Fucker
'
),
(
'
./do.bash mc
'
,
'
Minecraft Server
'
),
(
'
./do.bash push-httpdb-agent
'
,
'
httpdb
'
),
(
'
./do.bash ddns-wuhan
'
,
'
DDNS WuHan
'
),
(
'
./do.bash rocket
'
,
'
Recolic Rocket Chat
'
),
(
'
./do.bash ddns-home
'
,
'
DDNS home
'
),
(
'
./do.bash dl
'
,
'
Download Site
'
),
(
'
./do.bash shortlink
'
,
'
Short Link
'
),
(
'
./do.bash cc-dns
'
,
'
recolic.cc DNS
'
),
(
'
./do.bash home-http
'
,
'
Home
HTTP, NFS, NAS, BaiduDownloader, etc
'
),
(
'
./do.bash home-http
'
,
'
Home
NAS with HTTP
'
),
]
test_interval
=
20
*
60
# 20min
...
...
This diff is collapsed.
Click to expand it.
do.bash
+
20
−
39
View file @
1c06ffdd
#!/bin/bash
[[
$1
==
''
]]
&&
echo
-e
'Usage: '
"
$0
<operation> ...
\n
operation :=
rproxy | drive | v-tw | v-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 | cc-dns | home-http
| all"
&&
exit
1
[[
$1
==
''
]]
&&
echo
-e
'Usage: '
"
$0
<operation> ...
\n
operation :=
...
| all"
&&
exit
1
[[
$(
id
-u
)
=
0
]]
&&
ping_fld
=
"-f"
RETURN_CODE_SERVICE_CLOSE
=
91
[[
_
$RETURN_CODE_SERVICE_CLOSE
=
_
]]
&&
RETURN_CODE_SERVICE_CLOSE
=
91
function
test_icmp
()
{
local
host
=
"
$1
"
...
...
@@ -27,12 +27,6 @@ function test_tcp () {
[[
$ret
=
124
]]
&&
return
0
||
return
$ret
}
function
test_ss
()
{
# I can not publish password here so...
test_icmp
"
$1
"
test_tcp
"
$1
"
25551
return
$?
}
function
do_test
()
{
echo
"Testing >>
$1
"
>
/dev/fd/2
...
...
@@ -44,28 +38,21 @@ function do_test () {
;;
drive
)
# NO icmp required because of udp2raw
curl
-s
https://drive.recolic.net/
index.php/
login |
grep
'drive.recolic.'
||
return
$?
curl
-s
https://drive.recolic.net/login |
grep
'drive.recolic.'
||
return
$?
;;
v-tw
)
curl https://git.recolic.net/vr/test
-vv
2>&1 |
grep
404
||
return
$?
;;
v-hk
)
test_tcp base.hk1.recolic.net 443
||
return
$?
curl https://git.recolic.net/vr/test404
-vv
2>&1 |
grep
404
||
return
$?
;;
frp-hk
)
test_tcp base.hk1.recolic.net 30999
||
return
$?
;;
ss-us1
)
return
$RETURN_CODE_SERVICE_CLOSE
test_
ss
base.
us
1.recolic.net
||
return
$?
test_
tcp
base.
hk
1.recolic.net
30999
||
return
$?
;;
ss-us5
)
return
$RETURN_CODE_SERVICE_CLOSE
test_ss base.us5.recolic.net
||
return
$?
ss-us12
)
test_tcp base.us12.recolic.net 25551
||
return
$?
;;
ss-
us6
)
return
$RETURN_CODE_SERVICE_CLOSE
test_
ss
base.
us6
.recolic.net
||
return
$?
ss-
iplc
)
test_tcp base.cnjp1.recolic.net 25551
||
return
$?
test_
tcp
base.
cnjp1
.recolic.net
25552
||
return
$?
;;
ovpn-tw
)
# it's impossible to detect openvpn easily without ta.key and client-certificate
...
...
@@ -74,7 +61,7 @@ function do_test () {
# to fight against GFT deep-learning VPN detection.
# So I can do nothing.....
# NO icmp required because of
udp2raw
# NO icmp required because of
traffic obfused as raw IP packet.
# test_icmp base.tw1.recolic.net || return $?
;;
www
)
...
...
@@ -139,16 +126,10 @@ function do_test () {
[[
$r
=
$result
]]
return
$?
;;
ddns-
wuhan
)
ddns-
home
)
# NO icmp required.
test_tcp base.ddns1.recolic.net 25566
||
return
$?
;;
#ddns-us )
# test_tcp base.ddns2.recolic.net 22 | grep SSH &&
# test_tcp base.ddns2.recolic.net 80 &&
# test_tcp nohsts.ddns2.recolic.cc 22 | grep SSH &&
# test_tcp nohsts.ddns2.recolic.cc 80 || return $?
# ;;
test_tcp base.ddns1.recolic.net 22 |
grep
-a
SSH
||
return
$?
;;
dl
)
test_icmp dl.recolic.net
&&
curl
-s
-L
https://dl.recolic.net/ |
grep
'Home page is not provided for this download site'
||
return
$?
...
...
@@ -170,6 +151,9 @@ function do_test () {
# NO icmp required.
curl
-s
http://home.recolic-backend.xyz:81/
||
return
$?
;;
*
)
echo
PROGRAMMING ERROR: NO TARGET
"
$1
"
available.
return
1
esac
return
0
...
...
@@ -184,11 +168,9 @@ if [[ "$1" = all ]]; then
do_test_twice rproxy
&&
do_test_twice drive
&&
do_test_twice v-tw
&&
do_test_twice v-hk
&&
do_test_twice frp-hk
&&
do_test_twice ss-us1
&&
do_test_twice ss-us5
&&
do_test_twice ss-us6
&&
do_test_twice ss-us12
&&
do_test_twice ss-iplc
&&
do_test_twice ovpn-tw
&&
do_test_twice www
&&
do_test_twice mail
&&
...
...
@@ -197,8 +179,7 @@ if [[ "$1" = all ]]; then
do_test_twice zhixiang
&&
do_test_twice mc
&&
do_test_twice push-httpdb-agent
&&
do_test_twice ddns-wuhan
&&
do_test_twice rocket
&&
do_test_twice ddns-home
&&
do_test_twice shortlink
&&
do_test_twice dl
&&
do_test_twice cc-dns
&&
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment