Access my workplace intranet with a wrapper/mirror website resides on my vps

I’ve a vps with the my.domain.xyz FQDN. At the meanwhile, a socks5 proxy server runs on VPS and listens on port 1080 which can access the website on my office subnet, say, by starting chrome with the following command:

$ google-chrome --proxy-server=“socks5://my.domain.xyz:1080

Then I can access my workplace intranet, say, the following one:

http://10.10.10.10:2021

This way works but some cumbersome settings are required. I want to access my workplace intranet with a wrapper/mirror website resides on my vps, say, http://my.domain.xyz:21080, which can access the intranet website via the socks5 proxy server mentioned above. I mean, when I open the URL http://my.domain.xyz:21080 from anywhere outside of the workplace intranet, it will automatically redirected to http://10.10.10.10:2021 via the socks5 proxy server “socks5://my.domain.xyz:1080”.

Is there a feasible way to achieve this aim with the help of unix tools/javascript/python?

Regards,
HZ

This is a Unix sys admin problem, not really a Python problem. Any
Python solution would involve first working out how to do it using Unix
tools, then either duplicating the effect of the Unix tools in Python,
or calling out to those Unix tools from Python.

1 Like

It seems that your comment is similar to the reply here:
https://groups.google.com/g/comp.unix.shell/c/ChuvGxkK8Jg/m/FMVDhYu3DAAJ