Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #39437

Re: Transparent Proxy and Redirecting Sockets

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <bongio87@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'socket': 0.05; '21,': 0.07; 'parser': 0.07; 'plenty': 0.07; 'python': 0.09; 'cc:addr :python-list': 0.10; 'suggest': 0.11; 'task.': 0.16; 'tcp': 0.16; 'twisted': 0.16; 'wrote:': 0.17; 'thu,': 0.17; 'feb': 0.19; 'email addr:gmail.com&gt;': 0.20; 'all,': 0.21; 'cheers,': 0.23; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'url:wiki': 0.26; 'am,': 0.27; 'message- id:@mail.gmail.com': 0.27; 'this?': 0.28; 'fast.': 0.29; 'leverage': 0.29; 'url:mailman': 0.29; 'framework': 0.30; 'code': 0.31; 'implement': 0.32; 'url:python': 0.32; 'sources': 0.32; 'url:listinfo': 0.32; 'received:google.com': 0.34; 'doing': 0.35; 'url:org': 0.36; 'useful': 0.36; 'thank': 0.36; 'resources': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'url:mail': 0.40; 'traffic': 0.61; 'between': 0.63; 'taking': 0.65; 'brown': 0.65; 'pleased': 0.66; '2013': 0.84; 'url:trac': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=a8ufcCiVh8wAtCrT0ySKoDpShy1phogbiK+swJuwmmQ=; b=W3JDVOfWzZSv9lBGQsVxRrBwgP4S2pvj+7d7/3YqGg1ZWXEiKDeZO7TK5ZcwRvPy0D 9KNg3hpDgv1q1tF3UxhLdbePdj4PyhhBmOWbdDFqnslDXiY6Mj5+3K4gAVTD7mn76EM/ 6ZX31qEYLql6aWPuh6vUKTcsiRLYW7daISttfUth+q5t5IO0/dEDiBfrYvvdD9QsMP9m n3hszeGojcx8yUXXfU5NrgaH2owCMcNgP5i+vJ9i+K6tNUADFTvLMCXrucn8vuy280ub sJ4fZV8E+3K/qKkz97BKM/rdcMDI4PG16pR0wLbwxkynnDiTmWYui5VvrstgWqpeg70/ zwcw==
MIME-Version 1.0
X-Received by 10.42.122.66 with SMTP id m2mr11056569icr.15.1361461650773; Thu, 21 Feb 2013 07:47:30 -0800 (PST)
In-Reply-To <CABRP1o8tyAMW86yGfK_zmgtwtT=Yup2R0fL81g7ApHqCDT2A+A@mail.gmail.com>
References <d14ab355-a134-405c-ada4-9ae64d7a8aac@googlegroups.com> <CABRP1o8tyAMW86yGfK_zmgtwtT=Yup2R0fL81g7ApHqCDT2A+A@mail.gmail.com>
Date Thu, 21 Feb 2013 17:47:30 +0200
Subject Re: Transparent Proxy and Redirecting Sockets
From Luca Bongiorni <bongio87@gmail.com>
To Rodrick Brown <rodrick.brown@gmail.com>
Content-Type multipart/alternative; boundary=20cf3003bbb611d7bc04d63dfe81
Cc "python-list@python.org" <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2177.1361461659.2939.python-list@python.org> (permalink)
Lines 115
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1361461659 news.xs4all.nl 6852 [2001:888:2000:d::a6]:37668
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:39437

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

2013/2/21 Rodrick Brown <rodrick.brown@gmail.com>

> On Thu, Feb 21, 2013 at 10:24 AM, Luca Bongiorni <bongio87@gmail.com>wrote:
>
>> Hi all,
>> Around I have found plenty useful sources about TCP transparent proxies.
>> However I am still missing how to make socket redirection.
>>
>> What I would like to do is:
>>
>> host_A <--> PROXY <--> host_B
>>               ^
>>               |
>> host_C <------
>>
>> At the beginning the proxy is simply forwarding the data between A and B.
>> Subsequently, when a parser catches the right pattern, the proxy quit the
>> communication between A and B and redirect all the traffic to the host_C.
>>
>> I would be pleased if someone would suggest me some resources or hints.
>>
>>
> Are you looking for a Python way of doing this? I would highly recommend
> taking a look at ha-proxy as its very robust, simple and fast. If you're
> looking to implement this in Python code you may want to use a framework
> like Twisted - http://twistedmatrix.com/trac/wiki/TwistedProject
>
> Twisted provides many functionality that can leverage to accomplish this
> task.
>

Thank you for the hint. I will start to delve on it right now.
Cheers,
Luca


>
>
>> Thank you :)
>> Cheers,
>> Luca
>>
>> --
>> http://mail.python.org/mailman/listinfo/python-list
>>
>
>

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Transparent Proxy and Redirecting Sockets Luca Bongiorni <bongio87@gmail.com> - 2013-02-21 07:24 -0800
  Re: Transparent Proxy and Redirecting Sockets Rodrick Brown <rodrick.brown@gmail.com> - 2013-02-21 10:39 -0500
  Re: Transparent Proxy and Redirecting Sockets Luca Bongiorni <bongio87@gmail.com> - 2013-02-21 17:47 +0200

csiph-web