Files
felhom.eu/documentation/audits/linetest-2026-10-27/tools/fwd.py
T
admin acd79a78cc
gates / gates (push) Successful in 2m29s
Release block 2026-10-27: hub 0.173.0, agent 0.167.0, controller 0.346.0 released; R-1250 fixed the same day and proven; ten rows closed, R-1312 opened
- audits/linetest-2026-10-27/: the hold failed four times as built (qBittorrent drains ~14 s), the fix 710ceac, the test
  through the hold on 0.346.0-rc.1 (94.5 Mbit/s, the limit back exactly), teardown.
- audits/release-2026-10-27/: builds, agent release + signed updates, per-box and global floors, box walk.
- 09 §3 decisions 269 (R-1250 fix the same day) and 270 (R-1218 live proof waived); D55's window result in 268.
- 08 §: the drain-wait design line. STATUS, CONTEXT, register (223 -> 214).
2026-10-27 15:45:59 +01:00

37 lines
1.5 KiB
Python

# R-1250 live test only (2026-10-27): forward guest 9201's LAN :6881 (TCP and UDP) to its throwaway qBittorrent
# container, so DooPlex's qBittorrent can reach the seed. Started by hand, killed at teardown.
import socket, sys, threading
LAN, DST = sys.argv[1], (sys.argv[2], 6881)
def pipe(a, b):
try:
while True:
d = a.recv(65536)
if not d: break
b.sendall(d)
except OSError: pass
finally:
for s in (a, b):
try: s.shutdown(socket.SHUT_RDWR)
except OSError: pass
def udp():
us = socket.socket(socket.AF_INET, socket.SOCK_DGRAM); us.bind((LAN, 6881)); peers = {}
def back(client, s):
while True:
try: d, _ = s.recvfrom(65536)
except OSError: return
us.sendto(d, client)
while True:
d, client = us.recvfrom(65536)
s = peers.get(client)
if s is None:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM); s.connect(DST); peers[client] = s
threading.Thread(target=back, args=(client, s), daemon=True).start()
s.send(d)
threading.Thread(target=udp, daemon=True).start()
ls = socket.socket(); ls.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1); ls.bind((LAN, 6881)); ls.listen(16)
while True:
c, _ = ls.accept()
u = socket.create_connection(DST)
threading.Thread(target=pipe, args=(c, u), daemon=True).start()
threading.Thread(target=pipe, args=(u, c), daemon=True).start()