Skip to content

Commit bceddba

Browse files
committed
1 parent 16d5ae2 commit bceddba

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ pip install libasyncproxy/
5454

5555
## Usage
5656

57-
### libasyncproxy`AsyncProxy2FD` Example
57+
### asyncproxy`AsyncProxy2FD` Example
5858

5959
This example shows how to set up a bidirectional relay between two socket pairs using `AsyncProxy2FD`. Data sent on one end is forwarded to the other, and vice versa.
6060

6161
```python
6262
import socket
63-
from libasyncproxy.AsyncProxy import AsyncProxy2FD
63+
from asyncproxy.AsyncProxy import AsyncProxy2FD
6464

6565
# 1. Create two socket pairs:
6666
# - (client_socket, proxy_in): client writes to `proxy_in`
@@ -94,15 +94,15 @@ for sock in (client_socket, proxy_in, proxy_out, server_socket):
9494
sock.close()
9595
```
9696

97-
### libasyncproxy`TCPProxy` Example
97+
### asyncproxy`TCPProxy` Example
9898

9999
This example shows how to set up a TCP proxy accepting connections on
100100
`localhost:8080` and forwarding it to `www.google.com:80`.
101101

102102
```python
103103
import socket
104104
from time import sleep
105-
from libasyncproxy.TCPProxy import TCPProxy
105+
from asyncproxy.TCPProxy import TCPProxy
106106

107107
# 1. Initialize and start the proxy:
108108
# - Listen on local port 8080
@@ -124,14 +124,14 @@ for _ in (1, 2):
124124
proxy.shutdown()
125125
```
126126

127-
### libasyncproxy`AdvancedAsyncProxy2FD` Example
127+
### asyncproxy`AdvancedAsyncProxy2FD` Example
128128

129129
This example shows how to subclass `AsyncProxy2FD` to inspect and modify data in transit using custom `in2out` and `out2in` hooks.
130130

131131
```python
132132
import socket
133133
from ctypes import string_at, memmove
134-
from libasyncproxy.AsyncProxy import AsyncProxy2FD
134+
from asyncproxy.AsyncProxy import AsyncProxy2FD
135135

136136
class NosyProxy(AsyncProxy2FD):
137137
def in2out(self, res_p):

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ def get_ex_mod():
5858
'author':'Maksym Sobolyev',
5959
'author_email':'[email protected]',
6060
'url':'https://github.com/sippy/libasyncproxy.git',
61-
'packages':['libasyncproxy',],
62-
'package_dir':{'libasyncproxy':'python'},
61+
'packages':['asyncproxy',],
62+
'package_dir':{'asyncproxy':'python'},
6363
'ext_modules': get_ex_mod(),
6464
'classifiers': [
6565
'License :: OSI Approved :: BSD License',

tests/AsyncProxy2FD_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import socket
22
import unittest
33
from ctypes import string_at, memmove
4-
from libasyncproxy.AsyncProxy import AsyncProxy2FD, transform_res
4+
from asyncproxy.AsyncProxy import AsyncProxy2FD, transform_res
55

66
class NosyProxy(AsyncProxy2FD):
77
def in2out(self, res_p):

tests/AsyncProxy_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from time import sleep
2626
from socket import socketpair, AF_INET
2727

28-
from libasyncproxy.AsyncProxy import AsyncProxy, AsyncProxy2FD, setdebug
28+
from asyncproxy.AsyncProxy import AsyncProxy, AsyncProxy2FD, setdebug
2929

3030
class AsyncProxyTest(unittest.TestCase):
3131
debug = False

0 commit comments

Comments
 (0)