[Rpcemu] PATCH: Provide option to port forward TCP and UDP ports from host to RISC OS in NAT mode

Rob Kendrick rjek at rjek.com
Thu May 14 14:16:21 PDT 2020

Attached in a small patch that lets you forward ports from your host
machine through to your RISC OS guest when using NAT networking mode.

I have added a new config option in rpc.cfg, called forward_ports with
the following syntax:
	<tcp|udp>:host_port:riscos_port[ ...]

So, say you are running a web server listening on HTTP (port 80) and
HTTPS (port 8443), you might say:
	forward_ports=tcp:8080:80 tcp:8443:443

This will mean anything connecting to port 8080 on your host machine
will be proxied through to port 80 inside RISC OS. and the same for
8443 to 80.  Note that under most UNIX systems you will need extra
permissions (ie, root) to forward host ports <= 1024.

The parser will log with user-friendly messages if you get the syntax
wrong (unknown protocol, unparsable number, etc) and point a little
arrow at where the problem is.

I have added a suitable but primitive text entry box to the Networking
Configuration dialogue.  I did not enjoy this bit: GUI programming and
configuration dialogue state machines are terrible things.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-port-forwarding.patch
Type: text/x-diff
Size: 11553 bytes
Desc: not available
URL: <http://www.riscos.info/pipermail/rpcemu/attachments/20200514/8de8c4b2/attachment.patch>

More information about the RPCEmu mailing list