github valnesfjord/tg-ws-proxy-rs v2.2.4
tg-ws-proxy-rs v2.2.4

4 hours ago

The OpenWrt integration now names every installed path after this project
(tg-ws-proxy-rs) instead of the unsuffixed tg-ws-proxy names it shared with
the unrelated upstream OpenWrt package. The proxy protocol, CLI flags and TG_*
environment surface are unchanged.

Why

On a router running both implementations, 2.2.3 could not be installed at all:

ERROR: luci-app-tg-ws-proxy-2.2.3-r1: trying to overwrite etc/config/tg-ws-proxy owned by tg-ws-proxy-0.9.2-r1.
ERROR: luci-app-tg-ws-proxy-2.2.3-r1: trying to overwrite etc/init.d/tg-ws-proxy owned by tg-ws-proxy-0.9.2-r1.

The binary was the quieter half of the same problem. install.sh writes it
directly rather than through APK/opkg, so /usr/bin/tg-ws-proxy was replaced
with this port's binary without the package manager ever objecting.
(Reported in #108.)

Renamed

2.2.3 2.2.4
luci-app-tg-ws-proxy luci-app-tg-ws-proxy-rs
/usr/bin/tg-ws-proxy /usr/bin/tg-ws-proxy-rs
/etc/init.d/tg-ws-proxy /etc/init.d/tg-ws-proxy-rs
/etc/config/tg-ws-proxy /etc/config/tg-ws-proxy-rs
Services → Telegram WS Proxy Services → Telegram WS Proxy (Rust)

The LuCI menu, ACL, ucitrack and view paths follow the same suffix, and the live
log view filters on the -rs syslog identity, so the upstream package's lines no
longer appear on this page.

Upgrading

Re-run install.sh; it carries a 2.2.3 installation over on its own. The move
happens when luci-app-tg-ws-proxy is installed and no other package claims the
unsuffixed init script or config:

  1. the 2.2.3 service is stopped — it binds the same port;
  2. the new package and binary are installed, then /etc/config/tg-ws-proxy is
    copied to /etc/config/tg-ws-proxy-rs, secret and settings intact;
  3. the new service is started and verified;
  4. only then are luci-app-tg-ws-proxy, /etc/config/tg-ws-proxy and
    /usr/bin/tg-ws-proxy removed.

A failure before step 4 restores the 2.2.3 binary, config and service state, and
the backup under /root/tg-ws-proxy-backups/ is kept either way.

Removal is skipped, and reported, whenever it could destroy something that was
not replaced: a /usr/bin/tg-ws-proxy owned by another package, a failed package
removal, a config that was not carried over because an -rs config already
existed, or a 2.2.3 process that is still running. Ownership probing fails
closed — an unparsed answer counts as "owned by someone else" rather than as a
free path. A manual configuration is imported only from a process whose binary
no package claims. If 2.2.3 already overwrote an upstream
/usr/bin/tg-ws-proxy, reinstall that package to restore it.

Without luci-app-tg-ws-proxy installed, nothing is migrated. Copy a
hand-managed config before installing:

cp /etc/config/tg-ws-proxy /etc/config/tg-ws-proxy-rs

Cost

Release assets change name (luci-app-tg-ws-proxy-rs-2.2.4-r1.apk,
luci-app-tg-ws-proxy-rs_2.2.4-r1_all.ipk), and an install.sh copy older than
this release cannot install them — fetch the installer from main, as the
documented one-liner does. Anything scripted against uci ... tg-ws-proxy.main.*
or /etc/init.d/tg-ws-proxy has to be pointed at the -rs names.

Don't miss a new tg-ws-proxy-rs release

NewReleases is sending notifications on new releases.