Commit Graph

96 Commits

Author SHA1 Message Date
zarazaex69
e153ad2cb0 refactor: bulk fix golangci-lint issues (perfsprint, revive, errcheck, gosec, etc.) 2026-04-12 23:33:45 +03:00
zarazaex69
15795c0da1 refactor: pass context to NewPeer 2026-04-12 23:29:52 +03:00
zarazaex69
5a1a0c5453 refactor(logger): rename logger methods to Verbosef/Debugf 2026-04-12 23:29:27 +03:00
zarazaex69
943029307b refactor(telemost): fix linter issues in api.go 2026-04-12 23:27:49 +03:00
zarazaex69
d92e7f0158 refactor(client): fix linter issues in client.go 2026-04-12 23:26:14 +03:00
zarazaex69
5b0a324962 refactor(logger): fix linter issues in logger.go 2026-04-12 23:26:02 +03:00
zarazaex69
026993c9d1 refactor(protect): fix linter issues in protect.go 2026-04-12 23:25:52 +03:00
zarazaex69
85572722c4 refactor(server): fix linter issues and refactor complexity 2026-04-12 23:25:29 +03:00
zarazaex69
4d2b135d37 refactor(mux): fix linter issues and refactor HandleFrame 2026-04-12 23:24:34 +03:00
zarazaex69
9c1df94413 refactor(crypto): fix linter issues in chacha.go 2026-04-12 23:23:38 +03:00
zarazaex69
4fa4197184 refactor(telemost): use static errors in peer.go 2026-04-12 23:23:18 +03:00
zarazaex69
1465229077 refactor(telemost): fix errcheck and intrange in peer.go 2026-04-12 23:23:08 +03:00
zarazaex69
e5e3aa6e44 refactor(telemost): fix noctx and errcheck in sendTelemetry and GetConnectionInfo call 2026-04-12 23:22:48 +03:00
zarazaex69
46cae78433 refactor(telemost): add context and wrap errors in GetConnectionInfo 2026-04-12 23:22:07 +03:00
zarazaex69
80c31fe95f refactor(peer): remove debug logging from send queue worker 2026-04-12 23:14:17 +03:00
zarazaex69
8026d9cf7a refactor: remove dual channel (duo) mode functionality 2026-04-12 23:11:42 +03:00
zarazaex69
cbb1f0f2fe feat(server): add active client tracking and conditional reconnection 2026-04-12 16:25:00 +03:00
Qtozdec
245c6688ca Address PR review feedback 2026-04-11 20:07:22 +03:00
Qtozdec
a30aeedb26 Merge remote-tracking branch 'upstream/master'
# Conflicts:
#	internal/server/server.go
2026-04-11 15:18:35 +03:00
Kot-nikot
c1a30b677b Implement SOCKS5 proxy support in Server
Added SOCKS5 proxy support to the server, including new fields for proxy address and port in the Server struct. Updated the Run function and related methods to handle proxy connections.
2026-04-11 09:43:13 +03:00
Qtozdec
2067635ecb Fix olcRTC reconnect loop handling 2026-04-10 23:41:59 +03:00
Qtozdec
11b57071f2 Update olcRTC mobile bridge 2026-04-10 22:21:04 +03:00
Qtozdec
913cabe222 Add mux control frames 2026-04-10 16:26:15 +03:00
Qtozdec
ca0191d0de Improve Telemost session behavior 2026-04-10 16:03:42 +03:00
Qtozdec
6c4e79a7d0 Merge upstream master 2026-04-10 15:31:26 +03:00
zarazaex69
484e5160a9 perf(client): Replace event-driven data polling with ticker-based approach 2026-04-10 15:04:47 +03:00
zarazaex69
2a670e505e perf(server,peer): Adjust queue thresholds and improve buffer monitoring 2026-04-10 14:59:49 +03:00
zarazaex69
76ae387a04 perf(peer): Increase buffer threshold and adjust backpressure timing
Co-authored-by: qtozdec <56160254+qtozdec@users.noreply.github.com>
2026-04-10 14:56:39 +03:00
zarazaex69
a758b6fb2d perf(client,mux,server,peer): Remove verbose logging and optimize buffer thresholds 2026-04-10 14:54:21 +03:00
Qtozdec
11197a17b2 fix(peer): Raise DataChannel BufferedAmount threshold 64KB -> 4MB
The 64KB backpressure threshold was too aggressive — workers would
pause on nearly every frame since each 4KB chunk push took buffered
amount above the limit. The resulting "send one, wait 10ms, send one"
pattern throttled throughput to ~400KB/s, making HTTP/2 page loads
(Instagram, X) hang on large JS bundles.

Raised to 4MB so workers only pause under genuine congestion.
Monitor thresholds also raised so logs only fire on real backlog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 13:57:24 +03:00
Qtozdec
f48a63a0b9 feat(mobile,client,mux): Android integration + SOCKS5 auth + reliability fixes
- mobile/: gomobile-bindable entry point for Android (combined libgojni.so)
- internal/protect/: Android socket protect via VpnService for olcRTC sockets
- internal/names/data/: embedded name pools for client identity generation
- client: add SOCKS5 USER/PASS auth (RFC 1929) and bind to 127.0.0.1
- mux: infinite backpressure via waitForBufferSpace, raise buffer to 32MB,
  remove close-on-overflow (was corrupting reliable TCP streams over DC)
- peer: remove 3-second drop in send worker — wait for SCTP buffer to drain
  instead of dropping packets (broke large HTTP/2 transfers like Instagram/X)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 13:45:33 +03:00
zarazaex69
a35cbd947b feat(server): Add DNS caching and centralized resolver configuration 2026-04-09 21:04:05 +03:00
zarazaex69
ec26cce3dd feat(client,server,peer): Add backpressure handling and optimize buffer thresholds 2026-04-09 20:49:23 +03:00
zarazaex69
36009f3593 feat(peer): Refactor send queue processing with worker pool and monitoring 2026-04-09 20:45:57 +03:00
zarazaex69
90ffe72e10 feat(server,peer): Improve queue and buffer management with timeouts 2026-04-09 20:40:02 +03:00
zarazaex69
6d2e6bbb6e feat(client,peer): Add queue and buffer diagnostics to SOCKS5 logging 2026-04-09 20:36:16 +03:00
zarazaex69
7b889ae5ee feat(client): Add detailed timing and diagnostic logging for SOCKS5 connections 2026-04-09 20:34:50 +03:00
zarazaex69
e02df7d896 feat(server): Add configurable DNS server support 2026-04-09 20:27:44 +03:00
zarazaex69
fbde900ac5 refactor(client,server): Replace polling with event-driven data waiting 2026-04-09 20:13:57 +03:00
zarazaex69
9043d59ef8 perf(client,server): Reduce polling interval for imp 2026-04-09 20:06:43 +03:00
zarazaex69
3d39e245c8 feat(names): Add default Russian names and graceful fallback loading 2026-04-09 20:00:00 +03:00
zarazaex69
5c72dd185d fix(server): Replace context-aware select with sleep in run loop 2026-04-09 19:34:12 +03:00
zarazaex69
d60fcfec78 fix(server): Add logging for peer closure during shutdown 2026-04-09 19:31:55 +03:00
zarazaex69
3f0cfc4c45 feat(mux): Add verbose logging for out-of-order packet handling 2026-04-09 19:30:17 +03:00
zarazaex69
498e956202 feat(mux,client,server): Add sequence numbering and out-of-order packet handling 2026-04-09 19:27:35 +03:00
zarazaex69
02da40f0d2 fix(peer): Improve WebSocket closure and reconnection handling 2026-04-09 19:25:48 +03:00
zarazaex69
7172b0756e fix(peer): Improve error handling and logging in sendLeave and Close 2026-04-09 19:23:39 +03:00
zarazaex69
43b50518dd fix(client,server): Remove variable shadowing in error assignments 2026-04-09 19:18:11 +03:00
zarazaex69
580a7aa431 fix(client,server): Add wait group tracking to goroutines for graceful shutdown 2026-04-09 19:15:52 +03:00
zarazaex69
cd634ce9b6 fix(peer): Add wait group tracking to goroutines for graceful shutdown 2026-04-09 19:14:06 +03:00