Skip to content

OpcodeForwardProxyPass

mykiimike edited this page Sep 22, 2014 · 3 revisions

HTTP forward proxyPass opcode

HTTP forward proxy pass operation opcode used to connect to the source server.

Examples

var serverConfig = function(bs) { return({
	// [...]

	pipeline: {
		myPipe: [
			['proxyPass', {
				mode: 'host',
				timeout: 100,
				allowConnect: false
			}]
		],
	}
})};
  1. mode is the forwarding method used to connect to source servers :
  • host : use the request host HTTP header with IP DNS resolving in order to emit connections
  • tproxy-src-host spoof the source address and use the IP DNS resolving to emit connections
  • tproxy-src-dst spoof the source and use the destination address to emit connections (need tproxy server interface ON)
  • tproxy-dst do not spoof the source address but use the destination address to emit connections (need tproxy server interface ON)
  1. timeout is the connection timeout in second, default 30 seconds
  2. allowConnect to allow CONNECT methods on the interface
  3. localAddress is used to specify the IP to bind for network connections. NOTE: In the case of network interface alias don't forget to use a /32 mask
Clone this wiki locally