by Vitaly, Friday, July 31st, 2015
When TCP Port Mapper (tcpportmap) acts as a proxy (ProxyMode has one of the values: HTTP, CONNECT, SOCKS4 or SOCKS5), then MapToHost and MapToPort can be used to forward all traffic to the specifed host:port.
For example, let ProxyMode=CONNECT and TCP Port Mapper has received this command from the client:
CONNECT www.google.com:80 HTTP/1.1
- If
MapToHost=127.0.0.1,MapToPort=8080then TCP Port Mapper will establish connection to127.0.0.1:8080. - If
MapToHost=127.0.0.1,MapToPortis not specified (or zero) then TCP Port Mapper will establish connection to127.0.0.1:80. - If
MapToHostis not specified (or empty),MapToPort=8080then TCP Port Mapper will establish connection towww.google.com:8080. - If the both
MapToHostandMapToPortare not specified then TCP Port Mapper will establish connection towww.google.com:80.