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
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 <liudf0716@gmail.com>
PKG_LICENSE:=GPL-3.0-or-later

View File

@ -3,9 +3,8 @@ 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
@ -13,19 +12,14 @@ config xfrpc 'ssh01'
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

View File

@ -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