mirror of
https://github.com/darkk/redsocks.git
synced 2025-08-26 11:45:30 +00:00
fix: 403 found but not header provided
This commit is contained in:
parent
1b07ca821c
commit
d95c791e8b
@ -92,9 +92,14 @@ static void httpc_read_cb(struct bufferevent *buffev, void *_arg)
|
||||
|
||||
dropped = 1;
|
||||
} else {
|
||||
free_null(auth->last_auth_query);
|
||||
|
||||
char *auth_request = get_auth_request_header(buffev->input);
|
||||
|
||||
if (!auth_request) {
|
||||
redsocks_log_error(client, LOG_NOTICE, "403 found, but no proxy auth challenge");
|
||||
redsocks_drop_client(client);
|
||||
dropped = 1;
|
||||
} else {
|
||||
free_null(auth->last_auth_query);
|
||||
char *ptr = auth_request;
|
||||
|
||||
ptr += strlen(auth_request_header);
|
||||
@ -124,6 +129,7 @@ static void httpc_read_cb(struct bufferevent *buffev, void *_arg)
|
||||
redsocks_connect_relay(client);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (200 <= code && code <= 299) {
|
||||
client->state = httpc_reply_came;
|
||||
} else {
|
||||
|
10
http-relay.c
10
http-relay.c
@ -160,9 +160,14 @@ static void httpr_relay_read_cb(struct bufferevent *buffev, void *_arg)
|
||||
|
||||
dropped = 1;
|
||||
} else {
|
||||
free_null(auth->last_auth_query);
|
||||
|
||||
char *auth_request = get_auth_request_header(buffev->input);
|
||||
|
||||
if (!auth_request) {
|
||||
redsocks_log_error(client, LOG_NOTICE, "403 found, but no proxy auth challenge");
|
||||
redsocks_drop_client(client);
|
||||
dropped = 1;
|
||||
} else {
|
||||
free_null(auth->last_auth_query);
|
||||
char *ptr = auth_request;
|
||||
|
||||
ptr += strlen(auth_request_header);
|
||||
@ -194,6 +199,7 @@ static void httpr_relay_read_cb(struct bufferevent *buffev, void *_arg)
|
||||
redsocks_connect_relay(client);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else if (100 <= code && code <= 999) {
|
||||
client->state = httpr_reply_came;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user