Skip to content

proxy: vibe-coded reverse proxy - #41

Open
wryun wants to merge 1 commit into
openwrt:masterfrom
wryun:vibecode-proxy-support
Open

wryun wants to merge 1 commit into
openwrt:masterfrom
wryun:vibecode-proxy-support

Conversation

@wryun

@wryun wryun commented Sep 3, 2026

Copy link
Copy Markdown

I will not be at all offended if you close this PR immediately, and my apologies for the noise.

Useful when serving things like ttyd/mediamtx from LuCI via https. If nothing else, browsers don't like including non-https iframes etc.

There are tests in tests/ that pass, and I've done some brief testing of this in front of ttyd and mediamtx, but I haven't carefully reviewed the code.

For the OpenWrt uhttpd init script, you'd want something like:

       config_get reverse_proxy "$cfg" reverse_proxy
       for rp in $reverse_proxy; do
                procd_append_param command -Y "$rp"
       done

You can then do:

        list reverse_proxy '/mediamtx/hls=127.0.0.1:8888/'
        list reverse_proxy '/mediamtx/webrtc=127.0.0.1:8889/'
        list reverse_proxy '/ttyd=127.0.0.1:7681/'

Which would lead to something like:

root@pc-q35-ich9-2009-3338:~# ps ww | grep uhttpd
 9288 root      6768 S    /usr/sbin/uhttpd -f -h /www -r pc-q35-ich9-2009-3338 -x /cgi-bin -u /ubus -t 300 -T 30 -k 20 -A 1 -n 3 -N 100 -R -Y /mediamtx/hls=127.0.0.1:8888/ -Y /mediamtx/webrtc=127.0.0.1:8889/ -Y /ttyd=127.0.0.1:7681/ -p 0.0.0.0:80 -p [::]:80 -C /etc/uhttpd.crt -K /etc/uhttpd.key -s 0.0.0.0:443 -s [::]:443

Useful when serving things like ttyd/mediamtx from LuCI
via https (if nothing else, browsers won't like including
non-https iframes etc.).
@wryun wryun changed the title Vibe-coded reverse proxy proxy: vibe-coded reverse proxy Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant