You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,13 +54,13 @@ pip install libasyncproxy/
54
54
55
55
## Usage
56
56
57
-
### libasyncproxy — `AsyncProxy2FD` Example
57
+
### asyncproxy — `AsyncProxy2FD` Example
58
58
59
59
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.
60
60
61
61
```python
62
62
import socket
63
-
fromlibasyncproxy.AsyncProxy import AsyncProxy2FD
63
+
fromasyncproxy.AsyncProxy import AsyncProxy2FD
64
64
65
65
# 1. Create two socket pairs:
66
66
# - (client_socket, proxy_in): client writes to `proxy_in`
@@ -94,15 +94,15 @@ for sock in (client_socket, proxy_in, proxy_out, server_socket):
94
94
sock.close()
95
95
```
96
96
97
-
### libasyncproxy — `TCPProxy` Example
97
+
### asyncproxy — `TCPProxy` Example
98
98
99
99
This example shows how to set up a TCP proxy accepting connections on
100
100
`localhost:8080` and forwarding it to `www.google.com:80`.
101
101
102
102
```python
103
103
import socket
104
104
from time import sleep
105
-
fromlibasyncproxy.TCPProxy import TCPProxy
105
+
fromasyncproxy.TCPProxy import TCPProxy
106
106
107
107
# 1. Initialize and start the proxy:
108
108
# - Listen on local port 8080
@@ -124,14 +124,14 @@ for _ in (1, 2):
124
124
proxy.shutdown()
125
125
```
126
126
127
-
### libasyncproxy — `AdvancedAsyncProxy2FD` Example
127
+
### asyncproxy — `AdvancedAsyncProxy2FD` Example
128
128
129
129
This example shows how to subclass `AsyncProxy2FD` to inspect and modify data in transit using custom `in2out` and `out2in` hooks.
0 commit comments