xfrpc: Update to 1.05.548

deprecated xfrps, compatible with frps

Signed-off-by: Dengfeng Liu <liudf0716@gmail.com>
This commit is contained in:
Dengfeng Liu 2022-05-08 12:02:04 +08:00
parent 6e0f77acbe
commit 2cb01429b1
3 changed files with 11 additions and 25 deletions

View File

@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=xfrpc PKG_NAME:=xfrpc
PKG_VERSION:=1.04.515 PKG_VERSION:=1.05.548
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/liudf0716/xfrpc.git PKG_SOURCE_URL:=https://github.com/liudf0716/xfrpc.git
PKG_SOURCE_VERSION:=$(PKG_VERSION) PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_MIRROR_HASH:=1fd9b3dc9a38236dfd5bf4a8ad908d370820b4841f111b3078c5994bdaf3273e PKG_MIRROR_HASH:=67e0db1ea3986fdde6073db269a50fdf660cd97f4c21bfd8f2d4923a519e630e
PKG_MAINTAINER:=Dengfeng Liu <liudf0716@gmail.com> PKG_MAINTAINER:=Dengfeng Liu <liudf0716@gmail.com>
PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE:=GPL-3.0-or-later

View File

@ -3,9 +3,8 @@ config xfrp 'init'
option loglevel 7 option loglevel 7
config xfrpc 'common' config xfrpc 'common'
option server_addr 127.0.0.1 option server_addr frps_ip_address
option server_port 7000 option server_port 7000
option auth_token abdesf13d
config xfrpc 'ssh01' config xfrpc 'ssh01'
option type tcp option type tcp
@ -13,19 +12,14 @@ config xfrpc 'ssh01'
option local_port 22 option local_port 22
option remote_port 6000 option remote_port 6000
#config xfrpc 'ftp01'
# option type ftp
# option local_ip 127.0.01
# option local_port 21
# option remote_port 8021
# option remote_data_port 8022
#config xfrpc 'web01' #config xfrpc 'web01'
# option type http # option type http
# option local_ip 127.0.0.1 # option local_ip 127.0.0.1
# option local_port 8080 # option local_port 8080
# option custom_domains your_domain_name
#config xfrpc 'web02' #config xfrpc 'web02'
# option type https # option type https
# option local_ip 127.0.0.1 # option local_ip 127.0.0.1
# option local_port 8443 # option local_port 8443
# option custom_domains your_domain_name

View File

@ -20,7 +20,7 @@ handle_xfrpc() {
handle_type() { handle_type() {
uci_validate_section xfrpc xfrpc "$name" \ uci_validate_section xfrpc xfrpc "$name" \
'type:or("tcp", "udp", "ftp", "http", "https")' \ 'type:or("tcp", "http", "https")' \
'local_ip:ipaddr:127.0.0.1' \ 'local_ip:ipaddr:127.0.0.1' \
'local_port:uinteger' 'local_port:uinteger'
@ -28,15 +28,13 @@ handle_xfrpc() {
echo "local_ip = $local_ip" >> "$config" echo "local_ip = $local_ip" >> "$config"
echo "local_port = $local_port" >> "$config" echo "local_port = $local_port" >> "$config"
case "$type" in case "$type" in
"tcp"|"udp") tcp)
config_get remote_port "$name" remote_port config_get remote_port "$name" remote_port
echo "remote_port = $remote_port" >> "$config" echo "remote_port = $remote_port" >> "$config"
;; ;;
"ftp") http|https)
config_get remote_port "$name" remote_port config_get custom_domains "$name" custom_domains
config_get remote_data_port "$name" remote_data_port echo "custom_domains = $custom_domains" >> "$config"
echo "remote_port = $remote_port" >> "$config"
echo "remote_data_port = $remote_data_port" >> "$config"
;; ;;
esac esac
} }
@ -44,16 +42,10 @@ handle_xfrpc() {
if [ "$name" = "common" ]; then if [ "$name" = "common" ]; then
uci_validate_section xfrpc xfrpc "$name" \ uci_validate_section xfrpc xfrpc "$name" \
'server_addr:ipaddr' \ 'server_addr:ipaddr' \
'server_port:uinteger' \ 'server_port:uinteger'
'auth_token:string'
[ -z "$auth_token" ] && {
echo "no auth_token"
exit
}
echo "server_addr = $server_addr" >> "$config" echo "server_addr = $server_addr" >> "$config"
echo "server_port = $server_port" >> "$config" echo "server_port = $server_port" >> "$config"
echo "auth_token = $auth_token" >> "$config"
else else
handle_type handle_type
fi fi