Commit Graph
109 Commits
Author SHA1 Message Date
9seconds 66f4d967e7 Get rid of buffersize everywhere 2021-11-28 18:08:40 +03:00
9seconds fbe4d32590 Fallback to another DC if given is unknown 2021-09-24 11:47:35 +03:00
9seconds ca5800cf60 Simplify tcp relay time randomization 2021-08-30 10:47:36 +03:00
9seconds 456ed5b051 Change algorithm of TCP relaying 2021-08-27 17:22:36 +03:00
9seconds e1864377c2 Update golangci-lint to 1.40.1 2021-05-17 15:26:16 +03:00
9seconds 16f9ec690b Fix race condition in closing a relay
This commit fixes a situration when relay can be reset before all
waiting goroutines are finished. For example, we terminate processing
based on some event: socket error etc. So, error happens and context is
cancelled. After that a main relay goroutine starts to wait. Meanwhile a
second goroutine reaches deferred function and set wg to done. It means
that main goroutine can continue.

In this case this is really possible that we can start resetting before
transmit goroutine really exits.

A correct solution is to always do wg.Done() as a first deferred thing
on entering to a function. In that case we do not need reordering and so
on.
2021-05-06 22:08:39 +03:00
9seconds 115510985a Add option to use telegram test dcs 2021-04-09 16:45:37 +03:00
9seconds 585ebfeb50 Update golanci-lint 2021-04-09 14:35:04 +03:00
9seconds 43f5d2131e Add test for client hello validation 2021-04-08 15:26:49 +03:00
9seconds e2073f0585 Remove timeattack module 2021-04-08 14:58:14 +03:00
9seconds 54a7c6a2a5 Small subtle optimizations of faketls 2021-04-06 11:09:37 +03:00
9seconds 24fdec6694 Move testlib to internal 2021-04-02 21:32:06 +03:00
9seconds 38ff62fddc Add tests for faketls conn 2021-04-01 16:08:59 +03:00
9seconds 26070d5b3e More correct calculation of dc for obfuscated2 frame 2021-04-01 14:19:52 +03:00
9seconds 03d98ee256 Add relay test for timeout 2021-04-01 11:29:01 +03:00
9seconds dc28677086 Fix lint 2021-04-01 11:20:24 +03:00
9seconds 54f4b397b6 Add tests for relay conn 2021-04-01 11:17:45 +03:00
9seconds 96bcb6cd8e Add tests for welcome packet 2021-04-01 11:03:42 +03:00
9seconds 491b674e70 Add tests for client hello 2021-03-31 12:24:04 +03:00
9seconds 64754d1039 Add tests for faketls record 2021-03-30 17:47:20 +03:00
9seconds 23c42def4f Add test for faketls type and version 2021-03-30 16:45:07 +03:00
9seconds 841a4d2227 Get rid of unrequired buffering for tls records 2021-03-29 18:56:08 +03:00
9seconds 3cacd74e12 Correctly reset relay state 2021-03-29 14:36:02 +03:00
9seconds 4c3f42e264 Simplify relay 2021-03-29 10:37:09 +03:00
9seconds 3992054560 Correctly manage partial writes 2021-03-29 10:26:52 +03:00
9seconds 5eca6ecb05 Validate hostname if it was found in SNI 2021-03-26 17:23:30 +03:00
9seconds ce30e128e5 fixup address for dc 5 2021-03-26 16:37:59 +03:00
9seconds 9b78f766e8 fix lint issues 2021-03-26 14:17:33 +03:00
9seconds e2e464d32c Set random length of the tls packets 2021-03-26 14:12:05 +03:00
9seconds f0efa4697e Faketls works now 2021-03-26 12:15:26 +03:00
9seconds 6d92d5fe21 Fix lint issues 2021-03-25 17:40:38 +03:00
9seconds c3e8e8b1fe Add base faketls processing 2021-03-25 17:33:22 +03:00
9seconds a444a10bd0 Rename client hello file 2021-03-25 16:44:36 +03:00
9seconds d3551aa9cc Move clienhello to faketls 2021-03-25 16:44:06 +03:00
9seconds 4a2d1df384 Can correctly accept faketls messages 2021-03-25 16:22:00 +03:00
9seconds a3c64c1d1e Fix lint issue 2021-03-25 09:35:23 +03:00
9seconds 02aa969d6c Use dc indexes accordingly 2021-03-24 10:30:09 +03:00
9seconds 4da2a4f10f Add comment for relay test 2021-03-24 10:18:25 +03:00
9seconds 336e825e3a Add wg to observer
This is to ensure a case when we still can have observer hanging around
2021-03-24 10:16:54 +03:00
9seconds b42e51e300 Small improvements 2021-03-24 10:12:22 +03:00
9seconds 6b1bfe7b17 Add primitive relay tests 2021-03-24 10:08:04 +03:00
9seconds 3076c52adb Refactor snapshot files 2021-03-24 09:22:28 +03:00
9seconds 933855a233 Refactor server handshake test 2021-03-24 09:18:44 +03:00
9seconds ea698259d5 Add raw version of server handshake test 2021-03-23 22:06:39 +03:00
9seconds e3b7472239 Add test for handshake frame 2021-03-23 21:24:16 +03:00
9seconds a3362c7ea4 Proxy is working in a simple mode now 2021-03-23 15:14:36 +03:00
9seconds 66c45dc83b Add obfuscated2 server handshake 2021-03-23 10:27:22 +03:00
9seconds 42160a08fe Add EventTraffic 2021-03-22 17:54:46 +03:00
9seconds 925a02dac3 Test telegram dc dialer 2021-03-22 14:53:26 +03:00
9seconds 7108fe99ec Add implementation of telegram dialer 2021-03-22 12:30:23 +03:00