Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for SOCKS5 UDP_ASSOCIATE command #570

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
39ff28a
adding missing hooks
hc-syn Sep 5, 2023
2c5ad9f
udp wip
hc-syn Sep 6, 2023
8348e42
udp wip 2
hc-syn Sep 8, 2023
68180a6
bug fixes
hc-syn Sep 11, 2023
9f4cd23
implemented send hook logic
hc-syn Nov 28, 2023
5606132
add read_udp_header()
hc-syn Nov 29, 2023
48422d4
add dump_buffer in debug
hc-syn Dec 10, 2023
4c75e05
implements udp reception and fixes
hc-syn Dec 10, 2023
0ee4c00
add dump relay chain
hc-syn Dec 11, 2023
45aed86
close relay chain and v4inv6 to v4
hc-syn Dec 11, 2023
8ed4b52
separate functions, add utils, hook recvmsg
hc-syn Dec 11, 2023
f3511f8
dig works
hc-syn Dec 13, 2023
0197c92
digworks
hc-syn Dec 13, 2023
d2dc4d6
fix msgname NULL when connected socket
hc-syn Dec 19, 2023
95036aa
sendmmsg and fixes
hc-syn Jan 3, 2024
23c9654
hook connect and getpeername
hc-syn Jan 16, 2024
120cfe9
comments
hc-syn Jan 17, 2024
44c4352
removed receive_udp_packet()
hc-syn Jan 17, 2024
436f402
fix sockaddr / sockaddr_storage confusion
hc-syn Feb 1, 2024
5660aea
remove send_udp_packet()
hc-syn Feb 1, 2024
14c35dd
add filtering on send flags
hc-syn Feb 1, 2024
81092b1
define RECV_BUFFER_SIZE
hc-syn Feb 1, 2024
a47f9c0
change unsocksify_udp_packet() and
hc-syn Feb 1, 2024
e379a8a
implement MSG_TRUNC logic in recvfrom and recvmsg
hc-syn Feb 2, 2024
1c8c231
adding comments
hc-syn Feb 2, 2024
b377a29
hook read and write
hc-syn Feb 10, 2024
803f8a6
mutex, true_close, fix del_relay_chain
hc-syn Feb 13, 2024
0322811
change debug format
hc-syn Feb 13, 2024
12c9524
remove some debug
hc-syn Mar 20, 2024
004b19b
add chain debug
hc-syn Mar 20, 2024
7e818c1
fix sendmmsg deadlocks
hc-syn Mar 21, 2024
2eb03d3
Changed calls to close, sendto, recvfrom to calls to true_XX calls to
hc-syn Mar 22, 2024
65ab050
add uv_close hook
hc-syn May 22, 2024
14ba731
clean some comments
hc-syn Jun 20, 2024
2b40ffa
merge master commits
hc-syn Jul 18, 2024
04f6622
adapt to chain_step signature change
hc-syn Jul 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/allocator_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ static int trywrite(int fd, void* buf, size_t bytes) {
ssize_t ret;
unsigned char *out = buf;
again:
ret = write(fd, out, bytes);
ret = true_write(fd, out, bytes);
switch(ret) {
case -1:
if(errno == EINTR) goto again;
Expand All @@ -200,7 +200,7 @@ static int tryread(int fd, void* buf, size_t bytes) {
ssize_t ret;
unsigned char *out = buf;
again:
ret = read(fd, out, bytes);
ret = true_read(fd, out, bytes);
switch(ret) {
case -1:
if(errno == EINTR) goto again;
Expand Down Expand Up @@ -350,11 +350,11 @@ void at_init(void) {
void at_close(void) {
PFUNC();
const int msg = ATM_EXIT;
write(req_pipefd[1], &msg, sizeof(int));
true_write(req_pipefd[1], &msg, sizeof(int));
pthread_join(allocator_thread, NULL);
close(req_pipefd[0]);
close(req_pipefd[1]);
close(resp_pipefd[0]);
close(resp_pipefd[1]);
true_close(req_pipefd[0]);
true_close(req_pipefd[1]);
true_close(resp_pipefd[0]);
true_close(resp_pipefd[1]);
MUTEX_DESTROY(internal_ips_lock);
}
Loading