Skip to content

Commit

Permalink
add setup and register on pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
nanwu committed Jun 7, 2017
1 parent 21e5338 commit c694a54
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
4 changes: 0 additions & 4 deletions README

This file was deleted.

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

A SOCKS5 proxy implemented on asynchronous IO model.

3 changes: 3 additions & 0 deletions server_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def connection_made(self, transport):
def data_received(self, data):
self.logger.info('CURRENT STATE:{}'.format(
Socks5ProtocolState.state_name(self.state)))
self.logger.info('Receive data from client:\n')
self.logger.info(data)

if self.state == Socks5ProtocolState.INIT:
Expand Down Expand Up @@ -227,10 +228,12 @@ def connection_lost(self, exc):

if self.transport_to_remote:
self.transport_to_remote.close()
self.logger.debug('Connection to remote is closed.')

def _tunneling(self, data):
self.logger.debug('Sending data to remote')
self.transport_to_remote.write(data)
self.logger.debug('Sent data to remote.')


loop = asyncio.get_event_loop()
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[metadata]
description-file = README.md
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from distutils.core import setup


setup(
name = 'asocks',
version = '0.1.0',
description = 'A SOCKS5 proxy server implementation based on '
'async IO model.',
author = 'Nan Wu',
author_email = '[email protected]',
url = 'https://github.com/nanwu/asocks',
keywords = ['socks', 'proxy', 'python3', 'async']
)

0 comments on commit c694a54

Please sign in to comment.