I am developing & testing with "remote servers"; using URLs for the remote system like "whatever.internal.ip:8080/someWebApp"
Unfortunately, I am dealing with new IPs every day. And changing the URLs within the application I am developing/testing is cumbersome. Solution: simply use an URL like "localhost:8000" and dynamically connect port 8000 to "whatever.internal.ip:8080". So, when I want to test with a different remote system; I simply change the "forwarding" configuration; but my application itself simply continues to use the same "localhost"-based URL.
I did some searching and found the "redir" tool; installed it on my system; and invoked it (as normal user) with:
redir --laddr=127.0.0.1 --lport=8000 -cport=8080 -caddr=whatever...
But, unfortunately; the tool does nothing; it prints its "help" ... and exits. No error message; and --debug doesn't print anything either.
Please note: the "URL" part is not important for the question itself; I just added it to provide some background. Actually my question boils down to: when I type in the above example on my Ubuntu 14.04 ... "nothing happens" (besides redir printing its options).
[ Finally; I successfully used "ssh -L" to achieve this; but I am simply curious why redir doesn't work. Besides, ssh obviously implies that I can do ssh to the remote system; whereas redir claims to be independent of the underlying protocol ]