networking – How can I make a SOCKS proxy?

I have a server outside to which I would like to access through one specific port, with a binary and arbitrary protocol, defined in the server.

However, this server has a policy of host denial and allowance which allows only access from a certain number of domains. But, from where I would like to access this server, the DNS gives me several different domains for the same IP, some of which are from the ISP, and I would rather avoid them for security reasons. How can I manage to access this server with python preferentially, without fixing the client IP in the server?

Please note that this is one of the first questions that I do about sockets. Does this call itself SOCKS proxy or tunnel?

Could you give me links with such a program or python library?