handle initial requests to http proxy

wlan at mac.com wlan at mac.com
Sat May 17 07:21:55 UTC 2008


Working contributions are welcome!

On May 16, 2008, at 4:26 PM, Ivano Cristofolini wrote:

> just solved it by myself, sorry for the bother.
>
> Ivano
>
> On Fri, 2008-05-16 at 13:54 +0200, Ivano Cristofolini wrote:
>> Hello,
>>
>> I need to modify coova-chilli to capture http requests directed to a
>> (NON transparent) http proxy running on port 3128 (keeping current
>> functionality as well).
>>
>> I have successfully modified the http parsing functions in redir.c  
>> (very
>> simple: only redirurl changes).
>>
>> I'm trying to modify the DNAT routines in dhcp.c so that requests to
>> port 3128 are handled in the same way as regular requests to http
>> servers (i.e. they are NATted to uamserver).
>>
>> This is easy for dhcp_doDNAT() (I added the last line):
>>
>> ...
>>   /* Was it a http request for another server? */
>>   /* We are changing dest IP and dest port to local UAM server */
>>   if ((pack->iph.protocol == PKT_IP_PROTO_TCP) &&
>>       ((tcph->dst == htons(DHCP_HTTP)) ||
>>        (tcph->dst == htons(3128)))) {
>> ...
>>
>> I don't know how to do it for dhcp_undoDNAT().
>>
>> ...
>> /* Was it a reply from redir server? */
>> ...
>> if (something???) {
>>   tcph->src = htons(DHCP_HTTP);
>> else
>>   tcph->src = htons(3128);
>> ...
>>
>> Any suggestions?
>>
> -- 
> Ivano Cristofolini
> Presidio Informatico Ingegneria
> Direzione Informatica e Telecomunicazioni
> Universita' degli Studi di Trento
> Via Mesiano 77,
> 38050 Povo(TN), Italy
> Tel: +39 0461/881940
> Fax: +39 0461/882628
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: chilli-unsubscribe at coova.org
> For additional commands, e-mail: chilli-help at coova.org
> Wiki: http://coova.org/wiki/index.php/CoovaChilli
> Forum: http://coova.org/phpBB3/viewforum.php?f=4
>




More information about the Chilli mailing list