mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-07 19:13:20 +00:00
set the user-agent to 'meshagent source_commit_date' (#231)
This commit is contained in:
@@ -4129,6 +4129,13 @@ void MeshServer_ConnectEx(MeshAgentHostContainer *agent)
|
||||
ILibAddHeaderLine(req, "Host", 4, ILibScratchPad, (int)sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "%s:%u", host, port));
|
||||
}
|
||||
|
||||
// Set User-Agent for proxies to identify agents and versions
|
||||
const char* FieldData = "MeshAgent ";
|
||||
char combined[40];
|
||||
strcpy(combined, FieldData);
|
||||
strcat(combined, SOURCE_COMMIT_DATE);
|
||||
ILibAddHeaderLine(req, "User-Agent", 10, combined, (int)strnlen_s(combined, 50));
|
||||
|
||||
free(path);
|
||||
|
||||
if (useproxy != 0 || meshServer.sin6_family != AF_UNSPEC)
|
||||
|
||||
Reference in New Issue
Block a user