o
    ¯bì  ã                   @   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                   @   sF   e Zd ZdZg d¢g d¢g d¢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   )Ú
optActionszMakes a SOCKSv4 server.N)Ú__name__Ú
__module__Ú__qualname__ÚsynopsisÚoptParametersr   ÚCompletionsÚCompleteFilesÚCompleteNetInterfacesÚcompDataÚlongdesc© r   r   ú3/usr/lib/python3/dist-packages/twisted/tap/socks.pyr      s    ýþÿr   c                 C   sf   | d dkrt ƒ  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   ÚSOCKSv4FactoryÚintr   Ú	TCPServer)ÚconfigÚtÚportnor   r   r   ÚmakeService    s   r!   N)	Ú__doc__Útwisted.applicationr   Útwisted.protocolsr   Útwisted.pythonr   r   r!   r   r   r   r   Ú<module>   s   