httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian H. Stacey" <>
Subject how to get httpd to use a proxy, cascading to a 2nd proxy ?
Date Thu, 09 Apr 2015 08:45:59 GMT
I got no reply from users@ on 2nd April, with :
 Can httpd _use_ (not just _be_) a proxy, cascading to a 2nd proxy on a gate ?

(Not just the common case of httpd serving as a proxy for down stream clients,
 though I need that too on same httpd,  I already have that part working)

I want to get httpd on an internal host to serve as a proxy to a
USB tethered android (which it is already doing), + to pass requests
over ethernet LAN to a 2nd proxy on a LAN gateway. 

This may seem unusual; the reason:
	An android is tethered (IP over USB) to a FreeBSD PC laptop,
	Orweb browser on Android allows use of a proxy, FreeBSD
	laptop runs apache 2.2.29 httpd (listening on the USB IP)
	with httpd proxy enabled & PC allows android to reach various
	httpd PCs on local LAN of the PC.

	I want to tell the httpd on the PC interfacing the android,
	to pass android requests to a 2nd httpd running as LAN proxy
	on the gateway host, to reach the internet.

Why ? Why dont I just configure the FreeBSD PC to bridge packets
from USB to LAN ethernet, & on to LAN gate ?
  - I've failed to create a bridge, 
    Android rejects "route add default gw dev rndis0" 
	with: Not permitted, (I need to root the device),
    I think the FreeBSD PC side is OK:
  	/etc/rc.conf gateway_enable="YES" + sysctl net.inet.ip.forwarding=1
  - Laptop may later get a firewall (to protect LAN from android apps).

If httpd can not use a remote proxy, maybe I'll try packet diversion
via FreeBSD's ipfw,  but I'm hoping dev@httpd have code that calls a proxy ?

I've read
& contemplated nasty cludges eg:
	1st httpd on PC connected to android:
		<VirtualHost    *>
		Redirect temp /store/apps http://gate/playgoogle
	2nd httpd on LAN gate:
		Redirect temp /playgoogle
But it would be Ugly & wouldnt work for other URLs, eg when android map apps
go other places to download maps etc.

Maybe there's some clever mapping with
1st httpd to be receive request
& emit
& 2nd=gate to redirect to

Ideas / suggestions / code / URLs please ?

- --
Julian Stacey, BSD Linux Unix C Sys Eng Consultant Munich
	Indent previous with "> ".	Reply Below as a play script.
	Send plain text, Not quoted-printable, HTML, or base64.

View raw message