Загрузка данных
BusyBox v1.36.1 (2026-05-27 15:55:08 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 24.10.7, r29197-ab4c7d6af7
-----------------------------------------------------
root@OpenWrt:~# mount -o remount,rw /overlay
root@OpenWrt:~# /etc/init.d/tg-ws-proxy stop
root@OpenWrt:~# cat > /etc/init.d/tg-ws-proxy << 'EOF'
> #!/bin/sh /etc/rc.common
> # TG WS Proxy Rust — скачивается и распаковывается в /tmp (RAM), в ПЗУ не храни
тся
>
> START=99
> STOP=10
> USE_PROCD=1
>
> API_URL="https://api.github.com/repos/valnesfjord/tg-ws-proxy-rs/releases/latest"
> ASSET_PATTERN="mipsel-unknown-linux-musl-upx.tar.gz"
> WORK_DIR="/tmp/tg-ws-proxy-dl"
> BIN_PATH="/tmp/tg-ws-proxy"
>
> # ==== настройки ====
> HOST="192.168.1.1"
> PORT="1443"
> SECRET="ddfe66fd12463f12a40df978d1ec7f78c8"
> # ====================
>
> fetch_binary() {
> local tries=0 url=""
> mkdir -p "$WORK_DIR"
> while [ $tries -lt 10 ]; do
> url="$(curl -fsSL "$API_URL" | grep -o "\"browser_download_url\": *\"[^\"]*${ASSET_PATTERN}\"" | head -n1 | sed
's/.*"\(https[^"]*\)"/\1/')"
> if [ -n "$url" ] && curl -fsSL -o "$WORK_DIR/tg-ws-proxy.tar.gz" "$url"; then
> tar -xzf "$WORK_DIR/tg-ws-proxy.tar.gz" -C "$WORK_DIR"
> find "$WORK_DIR" -type f -name "tg-ws-proxy*" ! -name "*.tar.gz" -exec mv {} "$BIN_PATH" \;
> if [ -f "$BIN_PATH" ]; then
> chmod +x "$BIN_PATH"
> rm -rf "$WORK_DIR"
> logger -t tg-ws-proxy "Скачан и распакован: $url"
> return 0
> fi
> fi
> tries=$((tries+1))
> sleep 5
> done
> logger -t tg-ws-proxy "Не удалось скачать/распаковать бинарник после 10 по
пыток"
> return 1
> }
>
> start_service() {
> fetch_binary || return 1
>
> procd_open_instance
> procd_set_param command "$BIN_PATH" \
> --host "$HOST" \
> --port "$PORT" \
> --secret "$SECRET" \
> --quiet
> procd_set_param respawn 3600 5 0
> procd_set_param stdout 1
> procd_set_param stderr 1
> procd_close_instance
> }
>
> stop_service() {
> rm -f "$BIN_PATH"
> rm -rf "$WORK_DIR"
> }
> EOF
root@OpenWrt:~# chmod +x /etc/init.d/tg-ws-proxy
root@OpenWrt:~# /etc/init.d/tg-ws-proxy start
root@OpenWrt:~# logread | tail -20
Sun Aug 9 23:10:48 2026 daemon.err tg-ws-proxy[24414]: For more information, try '--help'.
Sun Aug 9 23:10:50 2026 daemon.info dnsmasq[3362]: read /etc/hosts - 214 names
Sun Aug 9 23:10:50 2026 daemon.info dnsmasq[3362]: read /tmp/hosts/dhcp.cfg01411c - 4 names
Sun Aug 9 23:10:50 2026 daemon.info dnsmasq[3362]: read /tmp/hosts/odhcpd - 2 names
Sun Aug 9 23:10:50 2026 daemon.info dnsmasq-dhcp[3362]: read /etc/ethers - 0 addresses
Sun Aug 9 23:10:54 2026 daemon.err tg-ws-proxy[24702]: error: unexpected argument '--mode' found
Sun Aug 9 23:10:54 2026 daemon.err tg-ws-proxy[24702]:
Sun Aug 9 23:10:54 2026 daemon.err tg-ws-proxy[24702]: Usage: tg-ws-proxy [OPTIONS]
Sun Aug 9 23:10:54 2026 daemon.err tg-ws-proxy[24702]:
Sun Aug 9 23:10:54 2026 daemon.err tg-ws-proxy[24702]: For more information, try '--help'.
Sun Aug 9 23:11:18 2026 user.notice tg-ws-proxy: Скачан и распакован: https://github.com/valnesfjord/tg-ws-proxy-rs/releases/download/v2.2.2/tg-ws-proxy-mipsel-unknown-linux-musl-upx.tar.gz
Sun Aug 9 23:11:21 2026 daemon.warn pppd[24413]: Timeout waiting for PADO packets
Sun Aug 9 23:11:21 2026 daemon.err pppd[24413]: Unable to complete PPPoE Discovery phase 1
Sun Aug 9 23:11:21 2026 daemon.info pppd[24413]: Exit.
Sun Aug 9 23:11:21 2026 daemon.notice netifd: Interface 'wan' is now down
Sun Aug 9 23:11:21 2026 daemon.notice netifd: Interface 'wan' is setting up now
Sun Aug 9 23:11:22 2026 daemon.info pppd[24837]: Plugin pppoe.so loaded.
Sun Aug 9 23:11:22 2026 daemon.info pppd[24837]: PPPoE plugin from pppd 2.5.1
Sun Aug 9 23:11:22 2026 daemon.notice pppd[24837]: pppd 2.5.1 started by root, uid 0
Sun Aug 9 23:11:22 2026 daemon.warn odhcpd[2206]: No default route present, setting ra_lifetime to 0!
root@OpenWrt:~# ps w | grep tg-ws-proxy
24791 root 7324 S /tmp/tg-ws-proxy --host 192.168.1.1 --port 1443 --secret ddfe66fd12463f12a40df978d1ec7f78c8 --quiet
25091 root 1396 S grep tg-ws-proxy
root@OpenWrt:~# netstat -tlnp | grep 1443
tcp 0 0 192.168.1.1:1443 0.0.0.0:* LISTEN 24791/tg-ws-proxy
root@OpenWrt:~#