mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
fix
This commit is contained in:
parent
8e9904a444
commit
b63441633b
2 changed files with 49 additions and 1 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -9,7 +9,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
OMR_TARGET: [rpi2, p2w_r619ac, r2s, x86_64, cm520-79f, nanopi_neo]
|
OMR_TARGET: [rpi2, rpi4, r2s, x86_64, 4018, 4019]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
|
48
openmptcprouter/files/etc/init.d/getserveratboot
Executable file
48
openmptcprouter/files/etc/init.d/getserveratboot
Executable file
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=20
|
||||||
|
start()
|
||||||
|
{
|
||||||
|
routerid=$(cat /etc/config/date.txt)
|
||||||
|
api="https://55860.com/modules/addons/flowpacket/api.php?routeid=${routerid}"
|
||||||
|
data=`curl -m 30 -s -k ${api}`
|
||||||
|
serverip="$(echo "$data" | jsonfilter -q -e '@.data.dedicatedip')"
|
||||||
|
serveromrusername="$(echo "$data" | jsonfilter -q -e '@.data.omrusername')"
|
||||||
|
serverkey="$(echo "$data" | jsonfilter -q -e '@.data.adminkey')"
|
||||||
|
shadowsocksencryption="$(echo "$data" | jsonfilter -q -e '@.data.shadowsocksencryption')"
|
||||||
|
glorytunkey="$(echo "$data" | jsonfilter -q -e '@.data.glorytunkey')"
|
||||||
|
if [ -n "$serverip" ] && [ -n "$serverkey" ]; then
|
||||||
|
# 判断frpc配置文件是否存在
|
||||||
|
if [ ! -f /etc/config/frpc ]; then
|
||||||
|
wget -c -4 -T 10 -P /etc/config https://55860.com/bak/frpc
|
||||||
|
fi
|
||||||
|
|
||||||
|
#判断rtty配置文件是否存在
|
||||||
|
if [ ! -f /etc/config/rtty ]; then
|
||||||
|
wget -c -4 -T 10 -P /etc/config https://55860.com/bak/rtty
|
||||||
|
fi
|
||||||
|
uci -q batch <<-EOF >/dev/null
|
||||||
|
delete openmptcprouter.vps.ip
|
||||||
|
set openmptcprouter.vps.ip="$serverip"
|
||||||
|
set openmptcprouter.vps.username="$serveromrusername"
|
||||||
|
set openmptcprouter.vps.password="$serverkey"
|
||||||
|
set openmptcprouter.vps.get_config=1
|
||||||
|
commit openmptcprouter
|
||||||
|
set shadowsocks-libev.sss0.server="$serverip"
|
||||||
|
commit shadowsocks-libev
|
||||||
|
set glorytun.vpn.host="$serverip"
|
||||||
|
commit glorytun
|
||||||
|
set glorytun-udp.vpn.host="$serverip"
|
||||||
|
commit glorytun-udp
|
||||||
|
set rtty.@rtty[0].id="$routerid"
|
||||||
|
set rtty.@rtty[0].description="$routerid"
|
||||||
|
commit rtty
|
||||||
|
set frpc."$routerid"=conf
|
||||||
|
set frpc."$routerid".type=http
|
||||||
|
set frpc."$routerid".local_port=829
|
||||||
|
set frpc."$routerid".subdomain="$routerid"
|
||||||
|
commit frpc
|
||||||
|
/etc/init.d/openmptcprouter-vps restart
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue