Hi [email protected],
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 192.168.42.139 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
        http://httpd.apache.org/docs/2.2/urlmapping.html#proxy
& contemplated nasty cludges eg:
        1st httpd on PC connected to android:
                <VirtualHost    *>
                ServerName      play.google.com
                Redirect temp /store/apps http://gate/playgoogle
        2nd httpd on LAN gate:
                Redirect temp /playgoogle http://play.google.com/store/apps
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
        http://httpd.apache.org/docs/2.2/rewrite/
1st httpd to be receive request
        http://domain/url_under_domain
& emit
        http://gate/indirect_trigger/domain/url_under_domain
& 2nd=gate to redirect to
        http://domain/url_under_domain

Ideas / suggestions / code / URLs please ?

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

Reply via email to