Commit Graph

192 Commits

Author SHA1 Message Date
Kunoi Sayami
a49c8676d8
Add parameters specify tcp server bind ip address (#1287) 2020-11-09 23:46:07 +03:00
levlam
c83a46a821 Fix Emscripten build.
GitOrigin-RevId: e5a6570b125ca0f1c0cc13809fece5834ee1f00a
2020-10-08 01:21:28 +03:00
levlam
98adef1145 Move url_decode to tdutils.
GitOrigin-RevId: bd9ef4caa56996a96626b16998b423ab304b9ee6
2020-09-14 18:58:39 +03:00
levlam
a74d02f412 Add option for checking IP address in the certificate as host.
GitOrigin-RevId: dba5b87a59f3d3d3241051ee0257a5786fdf4fb0
2020-09-14 03:58:57 +03:00
levlam
07237a18be Fix Logger const-correctness.
GitOrigin-RevId: 437ed337638a9841f7695fd77b89191f1b36c584
2020-09-02 17:10:10 +03:00
levlam
9592aac404 Minor improvements.
GitOrigin-RevId: 09fbcc25ade8d77c13dc580f13b206c07ba53f9f
2020-08-13 16:57:28 +03:00
Arseny Smirnov
4d19016970 HttpConnection: safe migrate between schedulers
GitOrigin-RevId: 2bcc79fc100613a86a8048a2c35e4791903ccb11
2020-08-10 17:10:16 +03:00
levlam
b45f8ba3a0 Minor fixes.
GitOrigin-RevId: b7985efd4257bc9bb2b2672f94c5f5671e19dd0f
2020-07-26 14:24:30 +03:00
Arseny Smirnov
47d2e8276a SslStream: fix ByteFlow logic
GitOrigin-RevId: 37e5ecd1480e0bb3035ea5ce0f10261cedfd1612
2020-07-24 18:49:33 +03:00
levlam
421ec5fa8f Migrate to other thread when receiving a file in multipart/form-data.
GitOrigin-RevId: dbd6c1092f297c5b534508f070f49c311a756fe4
2020-07-24 15:32:33 +03:00
Arseny Smirnov
04667e86a7 HttpConnection: migrate connections to a dedicated scheduler
GitOrigin-RevId: 91ece928204ee732e81eaedd5e869810c5bea3b8
2020-07-23 19:47:12 +03:00
levlam
a02f8d610d Speed up tests execution.
GitOrigin-RevId: 5bcac989d87a04ef8510c47232e3525c4e610073
2020-07-23 17:59:48 +03:00
Arseny Smirnov
b344269688 HttpReader: minor fixes
GitOrigin-RevId: f003a56d3137e6af1dc5d1d30b995f3ab5b154db
2020-07-23 16:48:17 +03:00
levlam
813e2b2961 Fix misprint.
GitOrigin-RevId: cec8d77edaf44c5527af694300118ad28748f5f4
2020-07-23 02:12:00 +03:00
levlam
db628a8c9e Increase mas file size limit.
GitOrigin-RevId: d10bb8abe7c70a2c94b0edc6f6d1fb08e49c7267
2020-07-23 01:59:28 +03:00
Arseny Smirnov
9ea1bc824f ByteFlow: backpressure draft
GitOrigin-RevId: 09adce82dd88fcf84f41e525e45b07da03acc0f6
2020-07-22 21:52:00 +03:00
Arseny Smirnov
38ef3a75cc PollableFd: explicit sync_with_poll
GitOrigin-RevId: 71fa35a594816e84e372ebcfa9d0077a13f26a62
2020-07-21 18:29:39 +03:00
levlam
26c7572f89 Increase maximum total HTTP parameter length.
GitOrigin-RevId: ec45c14398f11bbf4212429fcf8fd322abd72f5a
2020-07-20 20:04:59 +03:00
levlam
3bc52d545f Do not try to parse empty content in HttpReader.
GitOrigin-RevId: 585a90f2e0236d56626961edd5f822dc4fcb04a2
2020-07-19 14:49:12 +03:00
levlam
37fa018c28 Increase max content size in HttpReader.
GitOrigin-RevId: c31b929989d4ab3d4baf6e487488a27b190a11c1
2020-07-19 13:17:05 +03:00
levlam
87871f58c9 Fix CE.
GitOrigin-RevId: 9186caef923dc157fcac2af9da8d8430b5d6290f
2020-07-14 03:42:50 +03:00
levlam
7767842d4c Minor fixes.
GitOrigin-RevId: b9f67c5e5edf818610c1739533f01a7873e6e1b6
2020-07-14 03:37:04 +03:00
levlam
c89412e175 Minor improvements.
GitOrigin-RevId: 8942b7461a1c83f963510c9884cd003948967fd0
2020-07-13 21:49:07 +03:00
Arseny Smirnov
b5ae6b5b95 HttpQuery: store peer address into query
GitOrigin-RevId: 00b1b116e508ab49d9cabc192f7999069fb3add1
2020-07-13 15:23:03 +03:00
Arseny Smirnov
fee05df2cc HttpConnection: write_next_noflush for writes without flushing to socket
GitOrigin-RevId: 0b4ffbd7600b1ce466caf8a33897b555a2855211
2020-07-13 11:55:43 +03:00
levlam
2ac8c164ff Increase maximum file size.
GitOrigin-RevId: d4da965e7ecea03bc3eb356c41a81a715a06ace0
2020-07-03 17:31:06 +03:00
levlam
684727a05f Fix SslStream.
GitOrigin-RevId: 57413c47294757111356303a45e07da044660b95
2020-07-05 02:57:36 +03:00
Arseny Smirnov
4ed1713553 SslStream: reuse SslCtx in a simple case
GitOrigin-RevId: 4ac372b23d57a305d69f2d7ec3032b239b43ca7c
2020-07-02 18:01:23 +03:00
levlam
8872fbf6ac Fix tdutils after merge.
GitOrigin-RevId: 5b9a863e405a9e3782157570156fda71bf2bb589
2020-06-26 02:24:13 +03:00
levlam
ea4841a37c Unify enum constant name style.
GitOrigin-RevId: 2e36eef9b54c23da0d1bc9beb7e07af8835f702d
2020-06-15 04:23:47 +03:00
levlam
c022b1c5a1 Use td::vector in HttpQuery.
GitOrigin-RevId: ecef0bd11150712bdb45e59a33cd0706dda2097d
2020-06-13 23:36:10 +03:00
levlam
708ff55066 Simplify HttpHeaderCreator::init_status_line.
GitOrigin-RevId: 6c2962fcf126025a2b3066ade41baa9a2ba327d3
2020-06-09 03:44:16 +03:00
levlam
b1419f9de5 Fix some includes.
GitOrigin-RevId: f4b44d2e91ca72b6090d7f1f35673e8268723241
2020-06-07 18:14:52 +03:00
levlam
ed615430e1 Move OpenSSL error hancling functions to tdutils.
GitOrigin-RevId: 6d45b5ee1077eca430802fb6258104b0371688fa
2020-06-06 21:31:47 +03:00
levlam
e2fd1c13e9 Use new get_ip_host() method to get correct Host.
GitOrigin-RevId: 5ff0dc048c53abbc27d931b39374738ba9e25531
2020-05-23 01:53:13 +03:00
Amaury Van Bemten
7a2feba897 Surround IPv6 addresses by square braquets in HTTP CONNECT requests 2020-05-23 01:42:55 +03:00
levlam
088a96ff15 Add some checks.
GitOrigin-RevId: 6c24e7d3d48ed823a45d6b106855f3a0f55a0db5
2020-05-19 15:11:21 +03:00
levlam
5b18a56e03 Add IPAddress::get_ip_host and use it whenever appropriate.
GitOrigin-RevId: 7254ebd036463fe2c8b6262269cbee843b320421
2020-05-16 23:12:52 +03:00
levlam
9fe0d4bbd9 Do not remove brackets from HttpUrl IPv6 host.
GitOrigin-RevId: 59db5b747e66bd83cbfa81d4276af2aa1bb8b7ca
2020-05-16 22:53:19 +03:00
levlam
603c6e8a56 Improve SSL logging.
GitOrigin-RevId: 8b0f8f74581f64ba5cd51e4956768a451f910c84
2020-05-16 20:26:21 +03:00
levlam
8d9a72b8d5 Use SSL_CTX_set_min_proto_version for OpenSSL >= 1.1.0.
GitOrigin-RevId: b346e0b2dd5358d1154d537d02ddcba368b5e792
2020-05-16 20:08:44 +03:00
levlam
842e2033b7 Fix IP address verification in TLS certificate.
GitOrigin-RevId: 5275f8be34e9459a13a87e6fbd056754ceb515d4
2020-05-16 18:43:49 +03:00
levlam
7bdff46710 Do not send IP address in SNI.
GitOrigin-RevId: ff01b1f5f9219e34b0cacdf8acd49bf4e5a3daa2
2020-05-16 17:50:58 +03:00
levlam
e58d423af1 Add IPAddress::get_ip_address.
GitOrigin-RevId: 8b82c462f10d705412cb6cedc3d25d5fb95c59e2
2020-05-16 17:35:53 +03:00
levlam
bf963ccadf Make IPAddress::get_ipv6 safe to use.
GitOrigin-RevId: 47d50318abac4231efe63820902ba4d74b6dd03d
2020-05-16 16:11:03 +03:00
levlam
da6f582788 Fix 'Internal Server Error' spelling.
GitOrigin-RevId: 9dd65cc0e6ea64650647e9600e9b92ef9f373c7e
2020-04-27 20:10:13 +03:00
levlam
92df8f9827 Remove unneeded brackets.
GitOrigin-RevId: 0b8a2ae21d28e6c276db8b45ffb4d127800f5d73
2020-02-26 18:15:19 +03:00
levlam
182e8d29f0 New domain for DoH.
GitOrigin-RevId: 0ff1b52e9b8fade7ffa50e099789dcb3d12914ec
2020-01-25 23:36:49 +03:00
levlam
728d8d79f6 More enum class usages.
GitOrigin-RevId: 6680ce2276ced5b015a1f508f0b7b5f28b5f4a9b
2020-01-19 03:02:56 +03:00
levlam
9a40e695bb Return baack first_try in open_temp_file.
GitOrigin-RevId: de86f7b040272ed5bb0bd31ac49ce7ee76385914
2020-01-16 04:47:28 +03:00
levlam
4922ae62e0 Return back HttpQuery in get_simple_config_impl.
GitOrigin-RevId: 391c0c8cdd74633e57bc0780e1060c561468417a
2020-01-08 17:42:55 +03:00
levlam
a6be36e7f2 Always save temporary files in unique directory to ensure that all of them have different paths,
GitOrigin-RevId: 7113952a085f34a04eac38646f5a7a403bf9e9ba
2020-01-06 01:31:28 +03:00
levlam
80c35676a2 Update copyright year.
GitOrigin-RevId: 09afb551b6e637dc69739fa735b0051a38b9e14c
2020-01-01 04:23:48 +03:00
levlam
a14ee3e66c Do not use functional cast on integers.
GitOrigin-RevId: 1ebcf0e9a9b004039d32b6363140387bca7d7722
2019-12-24 16:46:10 +03:00
levlam
8c495d99e6 Use TRY_RESULT_ASSIGN.
GitOrigin-RevId: 99b60b9044fab9357a3440aed7da55f146677e6b
2019-12-08 09:57:33 +03:00
levlam
c1afa189f3 Support multiple chat lists.
GitOrigin-RevId: 8adecce0ddf36bb2408eecc19b7f1fc8856151fc
2019-08-22 18:24:02 +03:00
levlam
4ce54818a3 Add get_simple_config_firebase_realtime.
GitOrigin-RevId: 04b3aedcbe9ec1985f69cced34b0d890eedcf934
2019-11-19 19:01:12 +03:00
levlam
9d441470c8 Support POST requests in Wget.
GitOrigin-RevId: d3f50200c22dcc6c5142581d74de3a41fca00305
2019-11-19 15:11:19 +03:00
levlam
0b6c1d226f Update clag-format to the latest (190926/r372920) version.
GitOrigin-RevId: 7861ae8ad28eb1f6a06ff3c6f56eff3f67b1d24c
2019-09-28 05:14:21 +03:00
levlam
f29c4a9ed1 Remove unneded explicit td::.
GitOrigin-RevId: e3888510ce72a55072a11d105311f07b4ba42bbf
2019-09-15 06:19:46 +03:00
levlam
f27dac69e1 Fix JSON spelling.
GitOrigin-RevId: ea2602f1e9a808ff1e28eb289936f9608aae7517
2019-08-26 05:06:00 +03:00
levlam
ad167a48ba Pass Slice to parse_url.
GitOrigin-RevId: e6cd357042b827ca56a11bb377c8b07ccd120230
2019-08-05 12:56:28 +03:00
levlam
4a2b76e1ef Fix testProxy.
GitOrigin-RevId: fcce1611113bec089ac3ca20df56eba85895a753
2019-07-23 01:13:20 +03:00
levlam
20503e04d2 Various fixes.
GitOrigin-RevId: da4869e5054952663ad5993f5770f2984a473818
2019-07-22 07:01:51 +03:00
Arseny Smirnov
d22a6751db tdweb: do not link with libssl, only with libcrypto
GitOrigin-RevId: fb7cd454c3b368381fd65150979e6233a452eb8c
2019-06-28 13:03:06 +02:00
levlam
a5413cf50d Explicitly use unique_ptr<HttpQuery>.
GitOrigin-RevId: 1d729c6b0a3d1deaf3423672414f155492b7a0e8
2019-06-17 19:12:54 +03:00
levlam
93494cf048 Fix log messages style.
GitOrigin-RevId: f99e2e838220826d3dea7fdc33c43ac9918a5efd
2019-02-21 18:58:20 +03:00
levlam
8c3eb953ae Fix some g++4.9 CE.
GitOrigin-RevId: 0d4ed1e684fd623a7ab5849e4f0f7ec2fd182694
2019-02-13 02:29:52 +03:00
levlam
9b42166c68 Explicitly include common.h.
GitOrigin-RevId: 5ae32c18d0ff18aac36334b494ea526ce7da4a9a
2019-02-13 00:26:36 +03:00
levlam
eb9ead582f Remove unneded includes of td/utils/loggging.h.
GitOrigin-RevId: 82a3b506dba5c9d5267dc0e2504a7093a7fa87db
2019-02-12 23:48:16 +03:00
levlam
130b49a524 Various include and other fixes.
GitOrigin-RevId: 68e03e0636cd4cff3e6fa876342ba16453630f15
2019-02-12 19:48:52 +03:00
levlam
0b7def8733 Add dns_resolver log tag.
GitOrigin-RevId: 17fed9f8350bb49e18b875ed21290c7805875df6
2019-02-04 17:02:21 +03:00
levlam
ca92472b69 Support numeric hosts in GoogleDnsResolver.
GitOrigin-RevId: 6768a90ad7f98d83f507051564fb1646d3834aad
2019-02-04 06:32:10 +03:00
levlam
6ccaf358b7 Support IDN hosts in all resolvers.
GitOrigin-RevId: c5b2741dd2d4e8bb0361e6dddf3b6749e5195c6a
2019-02-04 05:39:20 +03:00
levlam
fc8917a4ed Rename ResolveType to ResolverType.
GitOrigin-RevId: 64350527620c08bb192a18d951d5b3b5216f1162
2019-02-04 04:36:13 +03:00
levlam
da59ac47ea Support list of resolve types in GetHostByNameActor.
GitOrigin-RevId: 5aabc978b9a6caaecc2bf6c432421b2a4d766559
2019-02-04 04:32:32 +03:00
levlam
73a39a4699 GetHostByName: split cached values and active queries.
GitOrigin-RevId: c3d0ebd9202a22bf83ef03a044bda0b2d00d46b6
2019-02-04 03:19:31 +03:00
levlam
2dd4b91d51 Minor GetHostByName improvements.
GitOrigin-RevId: 9ceba9a941e3213a1748d22f38a126ace2d57e56
2019-02-04 03:12:40 +03:00
levlam
83037ee014 GetHostByName fixes and improvements.
GitOrigin-RevId: 531a53c4d559662be110d1ad6938ca3e52ccbc1e
2019-02-04 02:29:37 +03:00
levlam
311cd72feb enum class for ResolveType.
GitOrigin-RevId: 3cb46ab9c1c6913364748136722d2e8485cc6008
2019-01-24 20:21:00 +03:00
levlam
12ffc22483 Minor GetHostByName improvements.
GitOrigin-RevId: ff61c5aa543067e855a6f4a7f25c579a8c17aa87
2019-01-24 20:08:29 +03:00
Arseny Smirnov
bc838db8ec GetHostByNameActor: bufix and more tests
GitOrigin-RevId: fd2fb695724baf5531fcdc232c421684bd5cb139
2019-01-24 21:07:24 +04:00
Arseny Smirnov
c07b26e45c GetHostByNameActor: Options and test
GitOrigin-RevId: afebe6e940b2048d3ef6f6368ff824443d55a909
2019-01-24 17:07:11 +04:00
Arseny Smirnov
320d660f1c GetHostByNameActor support google dns
GitOrigin-RevId: 6ecc589426368cf2a821546b1dc104e4bf324335
2019-01-24 16:18:23 +04:00
Arseny Smirnov
dd190c7d79 DnsOverHttps class with a test
GitOrigin-RevId: 4f8785377ddbe47a59fe6e03628685902503e1f6
2019-01-24 13:47:54 +04:00
levlam
eaebfad034 Update copyright year.
GitOrigin-RevId: 359e2b43322222922c44c430d3814b0a4c778dc6
2019-01-01 01:02:34 +03:00
levlam
f81709acde Better handling of certificate adding errors.
GitOrigin-RevId: a2a498bd406ced8ea1ed34fca6b3d2fd8359d3af
2018-12-17 15:55:13 +03:00
levlam
ccf77c5e01 Better error messages while connecting to proxy.
GitOrigin-RevId: 25937285e2f3ee499f3335081f377ba584dcf068
2018-12-07 12:25:22 +03:00
levlam
7072b0319d Improve error message.
GitOrigin-RevId: 66bb30764ac37d2086731814daf8683794b76a13
2018-12-07 01:57:51 +03:00
levlam
b777051eaa Add logging of HttpProxy response.
GitOrigin-RevId: a7ad02206e0c6515d38a7f0b767735f25eb6c7c1
2018-12-06 20:29:10 +03:00
levlam
f435fe62a1 Fix HTTP spelling.
GitOrigin-RevId: f7d5626657406c1506434053efa68f28b4b6d674
2018-12-05 18:46:19 +03:00
levlam
5d5c55596e Minor improvements.
GitOrigin-RevId: 2f2099d91867ec302ff2d9426b6b088c8c625720
2018-11-01 20:08:20 +03:00
levlam
bc88b8e951 StringBuilder fixes.
GitOrigin-RevId: 1836df5f6931ca94e96e7281eeb1090163d8648f
2018-10-30 17:22:44 +03:00
levlam
28bfa4c4a6 Fix some MSVC Analyzer warnings.
GitOrigin-RevId: f62e8173ae9a5b78818f6575548ce22d4aa5c51d
2018-10-26 17:11:20 +03:00
levlam
1f216df1d8 Fix C26451 warning.
GitOrigin-RevId: 7c7fa7df4078dec15dfdc3db2df30ab5be234b5b
2018-10-25 21:29:10 +03:00
levlam
73440a8dea Workaround clang ICE "ran out of registers during register allocation" (2).
GitOrigin-RevId: 9a0c5a0b65bb6c7765ab28c86116c482191934e5
2018-10-22 02:02:52 +03:00
levlam
803602c4d1 Make tdnet dependency on OpenSSL private.
GitOrigin-RevId: 76331149d0d1e77ed0c4a3505ffe3568d98c0c01
2018-10-15 11:23:51 +03:00
levlam
1d32712f6a HttpReader: allow empty filename.
GitOrigin-RevId: ad65a2e603d4628c6a4d29d26300a113303d0c27
2018-10-14 19:08:15 +03:00
levlam
f948956bf7 Use td::unique_ptr instead of std::unique_ptr whenever possible.
GitOrigin-RevId: 424beb72dc62efdefdbffb75f1036ba9417f84cb
2018-09-27 04:19:03 +03:00
levlam
cc077a3971 Fix IPAddress::get_ipv4 usages.
GitOrigin-RevId: 6d87c9347aaa40957b1e524f889cf9fe8b179bb1
2018-09-11 19:40:53 +03:00