Commit Graph
96 Commits
Author SHA1 Message Date
PobreGato 4d88d21fe4 keep service owner of a handler as weak_ptr 2026-08-21 03:18:44 +03:00
jpk68 a57d375bf1 libi2pd: add missing checks and limits 2026-08-19 21:29:25 -04:00
PobreGato bde02543b0 take the acceptor off only if this tunnel set it 2026-08-18 05:14:42 +03:00
PobreGato a30e6ae50f keep the acceptor of a server tunnel through a reload 2026-08-18 04:34:47 +03:00
PobreGato 54172a5d80 use std::remove instead of std::erase for C++17 2026-08-14 04:36:06 +03:00
PobreGato df9e55be2c round-robin over several destinations in client tunnel 2026-08-14 03:26:43 +03:00
Dimitris Apostolou ea423cbe6f fix typos 2026-08-12 19:27:06 +03:00
orignal 95092d3fd2 fixed build error 2026-08-03 17:44:57 -04:00
Maxim Bunkov e16160b74d fix: cancel pending socket ops before close to prevent macOS crash
On macOS (kqueue), boost::asio throws an exception from pending
async_write/async_read handlers after the socket is closed.
This reaches io_service::run() as an uncaught exception and
terminates the process.

Call m_Socket.cancel() before shutdown/close in NTCP2, SAM,
I2PTunnel, and BOB so pending operations complete with
operation_aborted on a live socket.

Crash log (macOS 26, i2pd 2.61):
  libc++abi: terminating due to uncaught exception of type
  boost::wrapexcept<boost::system::system_error>:
  write_some: Bad file descriptor [system:9]

This is a kqueue-specific issue. On Linux (epoll), close() alone
cancels pending operations correctly. The fix is defensive on Linux
and required on macOS.
2026-08-04 02:04:30 +05:00
orignal 92ec218a8d pass bytes_transferred to AsyncSend callback 2026-07-23 11:24:10 -04:00
orignal 858c879b3e don't print read/write erro if socket got closed by other side 2026-07-21 08:26:36 -04:00
orignal 8f94b474d3 data sent with SYN packet should fit single packet 2026-07-01 10:18:07 -04:00
orignal 9d60d293d5 send data with SYN packet if available 2026-06-21 18:54:45 -04:00
orignal 149def0a5e fixed wrong Connection field for websocket 2026-06-14 17:11:54 -04:00
orignal 8bf34aacf6 resume idling cleint tunnel upon accepting new connecton 2026-04-06 15:59:01 -04:00
orignal 7f4bfccdbb read i2cp.closeIdleTime param. set last update time 2026-04-01 21:47:40 -04:00
orignal d65c7f94a0 print endpoint if server tunnel connection failed 2026-03-18 14:57:42 -04:00
orignal 4604497127 don't set remote endpoint to client tunnel 2026-03-07 12:16:45 -05:00
orignal 30a9f4a1bf check if socket is open before stream connect 2026-03-07 12:00:36 -05:00
orignal 0ed8b473f2 close I2P stream if socket got closed right after connect 2026-03-06 13:50:16 -05:00
Benson Muite 73623a4793 Replace deadline_timer by steady_timer
Prevent deprecation warnings when building.
2026-03-06 10:55:47 +03:00
orignal f94990c870 i2pheaders param for HTTP server tunnel 2025-11-02 12:09:06 -05:00
orignal 310ee78d24 create unique loopback address for ipv6 2025-08-26 21:16:15 -04:00
Dimitris Apostolou b00001752b fix typos 2025-08-20 17:49:45 +03:00
orignal 977967f793 try to resolve host again in server tunnel if failed before 2025-07-28 15:51:47 -04:00
orignal 8c204a4c10 use std::string_view for I2P HTTP headers. constexpr for ecxluded headers list 2025-07-18 22:39:21 -04:00
orignal 246bc43dea read more data from socket if available and stream buffer is not full 2025-05-07 18:54:55 -04:00
orignal aece5bb16c don't exceed stream max send buffer size 2025-05-03 08:47:49 -04:00
orignal 0cbada2196 correct receive buffer size 2025-05-02 13:23:53 -04:00
orignal d9f64c6f51 connection max stream buffer size 2025-05-01 18:09:39 -04:00
orignal b03ec650ef keep receving new data from socket while previous is being sent to stream 2025-04-29 12:56:35 -04:00
orignal c3d4d1bdf4 use array/string_view for exluded HTTP headers in server tunnel 2025-03-14 13:07:45 -04:00
orignal 5f762845f0 move BOB incoming connection logic from I2PTunnelConnection to BOB 2025-02-28 22:20:50 -05:00
orignal e518b92a89 calculate X_I2P_DEST* headers once for series of HTTP requests 2024-12-02 19:05:12 -05:00
orignal cc768de8ea iterator through resolver's results 2024-11-25 19:16:42 -05:00
orignal ffd18baf30 support boost 1.87 2024-11-25 16:00:06 -05:00
orignal ab02f722af print non-resolved address to log 2024-10-11 11:27:36 -04:00
r4sas a0795d8534 set server tunnel inport in ClientContext from port (#1936)
Signed-off-by: r4sas <r4sas@i2pmail.org>
2023-06-12 05:12:07 +03:00
r4sas 03cc6e0524 use uint16_t for ports
Signed-off-by: r4sas <r4sas@i2pmail.org>
2023-06-12 05:10:32 +03:00
r4sas 3af1f4bc76 Use of 'server' type tunnel port as inport (#1936)
Signed-off-by: r4sas <r4sas@i2pmail.org>
2023-06-12 00:32:44 +03:00
orignal 0ce15ffc91 check for incomplete HTTP header 2023-04-26 21:34:22 -04:00
orignal 7a12b5ca4b handle incomplete HTTP header lines 2023-04-18 19:25:15 -04:00
orignal 132557f941 don't return default destination if port is specified explicitly 2023-04-12 13:33:20 -04:00
orignal b8d21a1282 create non-default port destination explicitly 2023-04-12 07:46:50 -04:00
orignal 7c2da75197 don't recreate existing streaming destination 2023-04-03 19:05:35 -04:00
orignal f9b0bb0383 I2PTunnel/UDPTunnel split 2022-10-25 15:30:12 -04:00
orignal c2f91ea63b SSL connection for IRC server tunnel 2022-10-10 11:02:19 -04:00
R4SAS 96c4463d39 clean code
Signed-off-by: R4SAS <r4sas@i2pmail.org>
2022-10-09 20:24:43 +03:00
orignal 6b939eba59 fixed typo 2022-10-09 09:54:48 -04:00
orignal e82662b389 SSL support for server tunnels 2022-10-08 21:41:28 -04:00