From b266107c349f825c98c3b62981cd9f3b9756cde2 Mon Sep 17 00:00:00 2001 From: Dengfeng Liu Date: Sun, 8 May 2022 12:02:04 +0800 Subject: [PATCH] xfrpc: Update to 1.05.548 deprecated xfrps, compatible with frps Signed-off-by: Dengfeng Liu (cherry picked from commit 2cb01429b198702decc2744fc470270b3b328c63) --- net/xfrpc/Makefile | 4 ++-- net/xfrpc/files/xfrpc.conf | 12 +++--------- net/xfrpc/files/xfrpc.init | 20 ++++++-------------- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/net/xfrpc/Makefile b/net/xfrpc/Makefile index cce5519a39..a5108239e9 100644 --- a/net/xfrpc/Makefile +++ b/net/xfrpc/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xfrpc -PKG_VERSION:=1.04.515 +PKG_VERSION:=1.05.548 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/liudf0716/xfrpc.git PKG_SOURCE_VERSION:=$(PKG_VERSION) -PKG_MIRROR_HASH:=1fd9b3dc9a38236dfd5bf4a8ad908d370820b4841f111b3078c5994bdaf3273e +PKG_MIRROR_HASH:=67e0db1ea3986fdde6073db269a50fdf660cd97f4c21bfd8f2d4923a519e630e PKG_MAINTAINER:=Dengfeng Liu PKG_LICENSE:=GPL-3.0-or-later diff --git a/net/xfrpc/files/xfrpc.conf b/net/xfrpc/files/xfrpc.conf index a6cd8688b1..2b4df213af 100644 --- a/net/xfrpc/files/xfrpc.conf +++ b/net/xfrpc/files/xfrpc.conf @@ -3,29 +3,23 @@ config xfrp 'init' option loglevel 7 config xfrpc 'common' - option server_addr 127.0.0.1 + option server_addr frps_ip_address option server_port 7000 - option auth_token abdesf13d config xfrpc 'ssh01' option type tcp option local_ip 127.0.0.1 option local_port 22 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' # option type http # option local_ip 127.0.0.1 # option local_port 8080 +# option custom_domains your_domain_name #config xfrpc 'web02' # option type https # option local_ip 127.0.0.1 # option local_port 8443 +# option custom_domains your_domain_name diff --git a/net/xfrpc/files/xfrpc.init b/net/xfrpc/files/xfrpc.init index f4f31bc5e1..b9dec12a41 100755 --- a/net/xfrpc/files/xfrpc.init +++ b/net/xfrpc/files/xfrpc.init @@ -20,7 +20,7 @@ handle_xfrpc() { handle_type() { 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_port:uinteger' @@ -28,15 +28,13 @@ handle_xfrpc() { echo "local_ip = $local_ip" >> "$config" echo "local_port = $local_port" >> "$config" case "$type" in - "tcp"|"udp") + tcp) config_get remote_port "$name" remote_port echo "remote_port = $remote_port" >> "$config" ;; - "ftp") - config_get remote_port "$name" remote_port - config_get remote_data_port "$name" remote_data_port - echo "remote_port = $remote_port" >> "$config" - echo "remote_data_port = $remote_data_port" >> "$config" + http|https) + config_get custom_domains "$name" custom_domains + echo "custom_domains = $custom_domains" >> "$config" ;; esac } @@ -44,16 +42,10 @@ handle_xfrpc() { if [ "$name" = "common" ]; then uci_validate_section xfrpc xfrpc "$name" \ 'server_addr:ipaddr' \ - 'server_port:uinteger' \ - 'auth_token:string' + 'server_port:uinteger' - [ -z "$auth_token" ] && { - echo "no auth_token" - exit - } echo "server_addr = $server_addr" >> "$config" echo "server_port = $server_port" >> "$config" - echo "auth_token = $auth_token" >> "$config" else handle_type fi -- 2.30.2