Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: third_party/twisted_8_1/twisted/tap/socks.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1
2 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
3 # See LICENSE for details.
4
5
6 """
7 I am a support module for making SOCKSv4 servers with mktap.
8 """
9
10 from twisted.protocols import socks
11 from twisted.python import usage
12 from twisted.application import internet
13 import sys
14
15 class Options(usage.Options):
16 synopsis = "Usage: mktap socks [-i <interface>] [-p <port>] [-l <file>]"
17 optParameters = [["interface", "i", "127.0.0.1", "local interface to which w e listen"],
18 ["port", "p", 1080, "Port on which to listen"],
19 ["log", "l", None, "file to log connection data to"]]
20 zsh_actions = {"log" : "_files -g '*.log'"}
21
22 longdesc = "Makes a SOCKSv4 server."
23
24 def makeService(config):
25 if config["interface"] != "127.0.0.1":
26 print
27 print "WARNING:"
28 print " You have chosen to listen on a non-local interface."
29 print " This may allow intruders to access your local network"
30 print " if you run this on a firewall."
31 print
32 t = socks.SOCKSv4Factory(config['log'])
33 portno = int(config['port'])
34 return internet.TCPServer(portno, t, interface=config['interface'])
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/tap/portforward.py ('k') | third_party/twisted_8_1/twisted/tap/telnet.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698