From 84d160b7eef8410cf810b1816f2bd913c39bf9fa Mon Sep 17 00:00:00 2001 From: alves Date: Mon, 19 Jan 2026 20:36:03 +0800 Subject: [PATCH] fix proxy question on request snapmaker server. --- src/slic3r/Utils/Http.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/slic3r/Utils/Http.cpp b/src/slic3r/Utils/Http.cpp index 3f31e0e10a..dc802449d7 100644 --- a/src/slic3r/Utils/Http.cpp +++ b/src/slic3r/Utils/Http.cpp @@ -165,6 +165,17 @@ static int log_trace(CURL* handle, curl_infotype type, return 0; } +// Domains that should bypass proxy and connect directly +// This helps when users have Shadowsocks/Clash/V2Ray proxy enabled +static const char* NOPROXY_DOMAINS = + "snapmaker.cn," + "snapmaker.com," + "*.snapmaker.cn," + "*.snapmaker.com," + "localhost," + "127.0.0.1," + "::1"; + Http::priv::priv(const std::string &url) : curl(::curl_easy_init()) , form(nullptr) @@ -194,6 +205,11 @@ Http::priv::priv(const std::string &url) ::curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L); ::curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); + // Bypass proxy for Snapmaker domains - this fixes issues when users have + // Shadowsocks/Clash/V2Ray or other proxy software enabled + // The domains in NOPROXY_DOMAINS will connect directly without going through proxy + ::curl_easy_setopt(curl, CURLOPT_NOPROXY, NOPROXY_DOMAINS); + // https://everything.curl.dev/http/post/expect100.html // remove the Expect: header, it will add a second delay to each request, // if the file is uploaded in packets, it will cause the upload time to be longer