U
    2ÜŸjì  ã                   @   sF   d Z ddlmZ ddlmZ ddlmZ G dd„ dejƒZdd„ Zd	S )
z?
I am a support module for making SOCKSv4 servers with twistd.
é    )Úinternet)Úsocks)Úusagec                   @   sR   e Zd ZdZddddgdddd	gd
dddggZeje d¡e ¡ dœd�Z	dZ
dS )ÚOptionsz([-i <interface>] [-p <port>] [-l <file>]Ú	interfaceÚiú	127.0.0.1z"local interface to which we listenÚportÚpi8  zPort on which to listenÚlogÚlNzfile to log connection data toz*.log)r   r   )Z
optActionszMakes a SOCKSv4 server.)Ú__name__Ú
__module__Ú__qualname__ZsynopsisZoptParametersr   ZCompletionsZCompleteFilesZCompleteNetInterfacesZcompDataZlongdesc© r   r   ú5/tmp/pip-unpacked-wheel-4b529toj/twisted/tap/socks.pyr      s   


ýþÿr   c                 C   sf   | d dkr8t ƒ  t dƒ t dƒ t dƒ t dƒ t ƒ  t | d ¡}t| d ƒ}tj||| d d	�S )
Nr   r   zWARNING:z5  You have chosen to listen on a non-local interface.z7  This may allow intruders to access your local networkz   if you run this on a firewall.r   r	   )r   )Úprintr   ZSOCKSv4FactoryÚintr   Ú	TCPServer)ÚconfigÚtZportnor   r   r   ÚmakeService    s    r   N)	Ú__doc__Ztwisted.applicationr   Ztwisted.protocolsr   Ztwisted.pythonr   r   r   r   r   r   r   Ú<module>   s
   