Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,4 @@ cython_debug/
marimo/_static/
marimo/_lsp/
__marimo__/
*.lnk
4 changes: 2 additions & 2 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"LISTEN_HOST": "0.0.0.0",
"LISTEN_PORT": 40443,
"CONNECT_IP": "188.114.98.0",
"CONNECT_IP": "188.114.99.0",
"CONNECT_PORT": 443,
"FAKE_SNI": "auth.vercel.com"
"FAKE_SNI": "chatgpt.com"
}
4 changes: 3 additions & 1 deletion fake_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys
import threading
import time
from concurrent.futures import ThreadPoolExecutor

from pydivert import Packet

Expand All @@ -29,6 +30,7 @@ class FakeTcpInjector(TcpInjector):
def __init__(self, w_filter: str, connections: dict[tuple, FakeInjectiveConnection]):
super().__init__(w_filter)
self.connections = connections
self.executor = ThreadPoolExecutor(max_workers=64)

def fake_send_thread(self, packet: Packet, connection: FakeInjectiveConnection):
time.sleep(0.001)
Expand Down Expand Up @@ -143,7 +145,7 @@ def on_outbound_packet(self, packet: Packet, connection: FakeInjectiveConnection

self.w.send(packet, False)
connection.sch_fake_sent = True
threading.Thread(target=self.fake_send_thread, args=(packet, connection), daemon=True).start()
self.executor.submit(self.fake_send_thread, packet, connection)
return
self.on_unexpected_packet(packet, connection, "unexpected outbound packet")
return
Expand Down
Loading