Add SSH terminal and fix LuCI proxy

This commit is contained in:
kzolotarev95 committed 2026-06-29 13:06:01 +04:00
1 parent 0e2ef7cbdb
commit 63b7fb7459
5 files changed
+485 -32

No files matched your search

+2 -1
View File
@@ -16,5 +16,6 @@ config remote 'main'
option reverse_tag 'reverse-in'
option admin_host '127.0.0.1'
option admin_port '80'
option ssh_host '127.0.0.1'
option ssh_port '22'
option public_url ''
+11 -2
View File
@@ -268,7 +268,7 @@ service_enabled() {
}
render_client_config() {
local out stdout router_id vps_host vps_port uuid encryption flow reverse_tag admin_host admin_port xray_config
local out stdout router_id vps_host vps_port uuid encryption flow reverse_tag admin_host admin_port ssh_host ssh_port xray_config
stdout="0"
if [ "${1:-}" = "--stdout" ]; then
stdout="1"
@@ -283,6 +283,8 @@ render_client_config() {
reverse_tag="$(safe_id "$(uci_get reverse_tag reverse-in)")"
admin_host="$(uci_get admin_host 127.0.0.1)"
admin_port="$(safe_num "$(uci_get admin_port 80)" 80)"
ssh_host="$(uci_get ssh_host 127.0.0.1)"
ssh_port="$(safe_num "$(uci_get ssh_port 22)" 22)"
xray_config="$(uci_get xray_config /etc/xray/owrt-remote-client.json)"
[ -n "$vps_host" ] || die "vps_host пустой"
@@ -300,13 +302,18 @@ render_client_config() {
"tag": "router-admin",
"protocol": "freedom",
"settings": {
"redirect": "$(json_escape "$admin_host"):$admin_port",
"finalRules": [
{
"action": "allow",
"network": "tcp",
"ip": "$(json_escape "$admin_host")",
"port": "$admin_port"
},
{
"action": "allow",
"network": "tcp",
"ip": "$(json_escape "$ssh_host")",
"port": "$ssh_port"
}
]
}
@@ -409,6 +416,8 @@ heartbeat_json() {
"public_url": $(json_string "$public_url"),
"admin_host": $(json_string "$(uci_get admin_host 127.0.0.1)"),
"admin_port": $(safe_num "$(uci_get admin_port 80)" 80),
"ssh_host": $(json_string "$(uci_get ssh_host 127.0.0.1)"),
"ssh_port": $(safe_num "$(uci_get ssh_port 22)" 22),
"hub_url": $(json_string "$hub_url"),
"uptime": $(safe_num "$(uptime_seconds)" 0),
"load": $(json_string "$(load_text)"),
+1 -1
View File
@@ -2,7 +2,7 @@
KEY_FILE="${KEY_FILE:-/etc/owrt-remote/web.key}"
AGENT="${AGENT:-/usr/sbin/owrt-remote}"
OWRT_REMOTE_UI_VERSION="2026-06-29-openwrt-remote-hub-v14"
OWRT_REMOTE_UI_VERSION="2026-06-29-ssh-terminal-v15"
PARAMS_FILE="${TMPDIR:-/tmp}/owrt-remote-cgi.$$"
RESULT_TITLE=""
RESULT_BODY=""