HTTPProxyAgent handles proxies to other web servers. It can provide complete http proxy services to browsers and other clients connecting on the addresses and ports specified in the listeners property, and it can proxy specific URLs from the http.proxy file while the WebServer handles other requests normally.
The http.proxy file lists full URLs or URIs to proxy and where they should be proxied to if the WebServer is running. It consists of name/value pairs separated by newlines. Lines beginning with the # character are ignored as comments. The value of each name/value pair must be a complete URL.
Here are some valid name/value pairs that might be used in the http.proxy file:
http://myserver/proxy_me=http://proxy:1099 http://myserver/proxy_me2=http://proxy1:9000 http://myserver/proxy_me2=http://proxy2:9000 http://myserver/proxy_me2=http://proxy3:9000When a browser requests /proxy_me, the HTTPProxyAgent contacts the web server at proxy on port 1099 and proxies the request to that server. When a browser requests /proxy_me_too, the HTTPProxyAgent cycles through the 3 web servers indicated, so that the first time the URL is accessed, the connection is proxied to proxy1:9000. The second time, the request is proxied to proxy2:9000, the third request goes to proxy3:9000, the fourth request goes to proxy1:9000, and so on. Both the name and the value of each name/value pair are assumed to be literal, so they will only match the exact path/hostname of the http request.
The servers listed in the http.proxy file are periodically checked to ensure that they are up and responding. The HTTPProxyAgent will not proxy requests to hosts from the http.proxy file that aren't responding.
HTTPProxyAgent also supports listeners, which operate independently of the WebServer to proxy traffic for browsers configured to use a proxy server. Any number of listeners can be started to provide proxy services on specific ports or IPs. Listeners are specified using the listeners prop of the HTTPProxyAgent.
This agent supports the following Props entries:For a list of all members of this type, see HTTPProxyAgent Members .
System.Object
Props
Agent
ServiceAgent
RequestAgent
HTTPProxyAgent
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Namespace: com.neokernel.httpd
Assembly: Neokernel (in Neokernel.exe)
HTTPProxyAgent Members | com.neokernel.httpd Namespace