forward proxy socket negotiation for HTTP CONNECT#1845
forward proxy socket negotiation for HTTP CONNECT#1845cliffjansen wants to merge 8 commits intoskupperproject:mainfrom
Conversation
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
|
|
||
| int err = getaddrinfo(host, port, &(struct addrinfo){.ai_family = AF_UNSPEC, .ai_socktype = SOCK_STREAM}, &ai); | ||
| if (err != 0) { | ||
| strncpy(errmsg, gai_strerror(err), errmsg_len); |
Check warning
Code scanning / GNU C11
'strncpy' specified bound 256 equals destination size Warning
| } | ||
| // Any 2XX code is success | ||
| if (response_line[9] != '2') { | ||
| snprintf(errmsg, errmsg_len, "proxy request denied %s", &response_line[9]); |
Check warning
Code scanning / GNU C11
'%s' directive output may be truncated writing up to 255 bytes into a region of size 235 Warning
| } | ||
| // Any 2XX code is success | ||
| if (response_line[9] != '2') { | ||
| snprintf(errmsg, errmsg_len, "proxy request denied %s", &response_line[9]); |
Check notice
Code scanning / GNU C11
'snprintf' output between 22 and 277 bytes into a destination of size 256 Note
Trial pull request for making connections through a forward proxy.
This contains a working prototype. Effort was made to make the new code minimally intrusive to existing code and following existing memory/threading conventions.
Todo:
Of note: