Thanks. This seems to work. I have pixelserv listening on .3:443. OpenVPN server won't start otherwise on 443, reporting the address in use. When I add this line to the custom config text box, it starts normally.
Because without "local" statement, OpenVPN binds to and listen on all interfaces (including your .3:443). Since your OpenVPN launches first and when pixelserv launches, it finds .3:443 is already occupied.
For my own education, how does the -k switch work?
It simply tells pixelserv-tls which ports to listen for HTTPS requests.
Is it that dnsmasq receives the https lookup on port 443, forwards that to .3 on that port, where it dies if pixelserv is listening on a different port?
Dnsmasq does a simple job. It translates an adserver domain (as defined in your hosts file) e.g. doubleclick.com to IP address. Take this as an example. Your browser first looks up the ip address of doubleclick.com. Dnsmasq replies with 192.168.0.3. Your browser then connects to 192.168.0.3:443. Pixelserv-tls receives the request and replies with an empty page.
So in any DNS based adblock implementations, Dnsmasq (or its more powerful counterparts such Unbound and BIND) is doing the heavy lifting.
Note that the port isn't decided by pixelserv but the ad URL embedded in webpages you visit. 443 is de facto for HTTPS traffic just like port 80 for HTTP.
@mstombs used to say he found some ad networks use non-standard ports. I believe that's why option -p was added to cover such edge cases. I added -k in the same spirit. I believe ad networks using non-standard ports are extremely rare today.
I follow that now OpenVPN is listening on the WAN interface at port 443, and pixelserv is listening on the LAN interface at port 443. It sounds like if I set -k to a different port, something else needs to be done for the switch to work.
If you decide to use -k to specify additional ports, you've to determine such a need first (most likely you don't). If ad URLs embedded in webpages you visit use non-standard ports, your browsers will automatically talk to pixelserv on these ports. You don't have to do anything.
-p/-k provide lots of flexibility where you might have to manipulate e.g. iptables rules for it to work. This may be for fun but not required. Just like iptables isn't the only way in Linux for such stunt to work.
Separately, do you know when build kj will propagate through entware-ng?
This is outside my control (perhaps
@ryzhov_al or
@zyxmon can check if their refresh schedule is near).
Alternatively you can download the statically built binary from pixelserv-tls
GitHub. Extract and replace the Entware binary. It'll work. When Kj is available from Entware, do an update and it will overwrite this copy again (so no junk will be created in any case).