Commit Graph

101 Commits

Author SHA1 Message Date
Ralf 2fccd5c51b Tunnels redesign 2025-12-17 01:25:15 +03:00
Ralf b759915d53 PR upd 2025-10-26 02:29:13 +03:00
lsroot e01a080429 feat: Add backward compatibility for batch sync optimization
- Add version detection via JWT token claims
- Support both legacy (v0.10) and optimized (v0.11+) sync modes
- Default to legacy mode for old clients (supportsBatchSync=false)
- Enable batch sync for clients version >= 0.11.0
- Add version field to Client, Credentials, and JWT Claims
- Implement automatic fallback to individual packet transmission
- Update client login to send FRAMEWORK_VERSION

Server changes:
- ts_clients.go: Add version detection and supportsBatchSync flag
- ts_sync.go: Add legacy fallback for old clients
- utils.go: Add version field to Client struct
- jwt.go: Add version to JWT claims
- tc_client.go: Extract and propagate version from credentials
- connector.go: Update interface signature

Client changes:
- Requestor.cpp: Send version in login request

This ensures zero-downtime deployment with mixed client versions.
2025-10-24 09:02:10 +08:00
lsroot 7ba6c79394 feat(sync): Phase 2 - Deep optimization with DirectAccess and categorization
Implement deep performance optimizations for log synchronization.

Server-side changes:
- Add DirectAccess() method to safe.Slice for zero-copy iteration
- Replace all Iterator() calls with DirectAccess() (10-15% faster)
- Implement type-based packet categorization (getPacketCategory)
- Add TYPE_SYNC_CATEGORY_BATCH (0x15) for organized batching
- Add SyncPackerCategoryBatch structure
- Update performance monitoring with category statistics

Client-side changes:
- Add TYPE_SYNC_CATEGORY_BATCH support
- Add category batch validation
- Unified batch processing for both batch types

Performance improvements:
- Eliminate slice copy overhead in Iterator
- Remove goroutine and channel creation overhead
- Improve cache locality with categorized transmission
- Better debugging with per-category statistics

Optimized functions:
- TsPresyncAgents, TsPresyncPivots, TsPresyncChat
- TsPresyncCredentials, TsPresyncTargets, TsPresyncEvents

Expected sync time for 3000 logs: 1.5s -> 0.8s (87% total improvement)

Related: Phase 1 batch transmission optimization
2025-10-24 08:41:05 +08:00
lsroot b037a729cd feat(sync): Phase 1 - Implement batch transmission optimization
Optimize client-server log synchronization performance with batch processing.

Server-side changes:
- Add TYPE_SYNC_BATCH (0x14) packet type
- Implement batch transmission in TsSyncStored() (BATCH_SIZE=100)
- Add SyncPackerBatch structure for batch packets
- Add performance monitoring with timing logs

Client-side changes:
- Add TYPE_SYNC_BATCH packet type definition
- Implement batch packet validation in isValidSyncPacket()
- Add batch processing logic in processSyncPacket()
- Optimize UI updates with setUpdatesEnabled() for batch operations
- Add sync performance tracking and display

Performance improvements:
- Reduce WebSocket calls from N to N/100 (99% reduction)
- Reduce UI update operations by 99%
- Expected sync time for 3000 logs: 6s -> 1.5s (75% improvement)

Related issue: Slow sync performance with 3000+ logs
2025-10-24 01:51:57 +08:00
Ralf bd2e566cf3 PR update 2025-09-07 13:46:48 +03:00
Exil 6b7ac8f799 Merge branch 'dev-v0.9' into add_chat 2025-09-05 16:17:56 +02:00
SETTAI Yassine ee9d08accb Add chat support 2025-09-05 16:10:41 +02:00
Ralf 6c4b94997e Link targets and agents 2025-09-03 10:23:37 +03:00
Ralf 4aac7d2b02 Fix 2025-08-26 10:41:43 +03:00
Ralf bf187c4714 target and creds update 2025-08-19 12:32:23 +03:00
Ralf 6de7c0afb0 creds update 2025-08-17 16:45:24 +03:00
Ralf b06b1fb25e tag for creds and targets 2025-08-15 14:49:42 +03:00
Ralf f0af30c975 Manage targets 2025-08-13 10:31:01 +03:00
Ralf 64fd590402 AddTarget 2025-08-12 10:18:25 +03:00
Ralf cfe5b71bfe TS: listeners update 2025-08-09 13:13:30 +03:00
Ralf d57514da41 tasks queue update 2025-08-03 10:37:23 +03:00
Ralf ac0a35f8fe Ax update
go mod update
ts fix
2025-07-28 10:51:52 +03:00
Ralf 740d8963d1 TS add posthooks 2025-07-13 10:30:48 +03:00
Ralf 3a64711f7c Add credentials manager 2025-07-08 09:21:41 +03:00
Ralf 042a9fde7a Agents Rewrite to Ax 2025-07-05 09:49:44 +03:00
Ralf aeea68be5a Listeners Rewrite to Ax 2025-07-04 09:21:43 +03:00
Ralf f46be3421c OTP and upload 2025-06-22 10:42:37 +03:00
Ralf c345c562c5 Add OTP secrets 2025-06-13 11:37:53 +03:00
Ralf a7d5b07e00 Terminal update 2025-05-28 11:45:33 +03:00
Ralf ba6af99e68 Tunnels upgrade 2025-05-28 08:55:46 +03:00
Ralf ad342cd624 Terminal update 2025-05-19 10:20:49 +03:00
Ralf 587dffa29b Add terminal 2025-05-18 11:52:49 +03:00
Ralf eb3ac2572b Gopher socks 2025-05-14 11:07:52 +03:00
Ralf f958f6a371 Tasks rewrite 2025-05-13 09:50:03 +03:00
Ralf 6bfc94ac66 ClientSide local port fwd 2025-05-11 11:22:06 +03:00
Ralf 35fd91afe9 Server: Tunnels rewrite 2025-05-09 16:25:42 +03:00
Ralf 493b1a125a Server add screenshots 2025-04-25 09:18:58 +03:00
Ralf 39f6cae31a Add killdate & worktime 2025-04-17 09:19:34 +03:00
Ralf 6a229a04b4 Extender config update 2025-04-11 09:53:49 +03:00
Ralf 2a003ee271 Listeners Update 2025-04-08 09:31:59 +03:00
Ralf bc2629ad35 adaptix package from github 2025-04-05 11:12:36 +03:00
Ralf 0e84081ba2 Update 2025-04-04 09:11:52 +03:00
Ralf 3e2f5ccbcb plugins update 2025-04-02 09:43:18 +03:00
Ralf a5c324a0b5 Pivot tasks upgrade 2025-03-23 09:31:42 +03:00
Ralf 251a94e0a3 pivots add 2025-03-20 09:38:03 +03:00
Ralf 7a70690e00 Code refactoring 2025-03-19 08:58:18 +03:00
Ralf 9f5733f16c getuid, rev2self added 2025-03-17 09:08:03 +03:00
Ralf 344febfa6a Impersonation Client/Server 2025-03-15 10:40:26 +03:00
Ralf c6f33973f0 Add user to Tasks 2025-03-14 09:01:44 +03:00
Ralf 89e8319623 Task hosted and running 2025-03-12 08:40:36 +03:00
Ralf f6b1fc6866 Server Code refactoring 2025-03-09 08:21:52 +03:00
Ralf fe02b52aa6 Add TASK_PROXY _DATA & consoles restore 2025-03-07 09:59:40 +03:00
Ralf e3530466c4 Tasks refactoring 2025-03-06 09:17:10 +03:00
Ralf 31f078bdcd Refactoring tasks 2025-03-04 09:38:36 +03:00