privacy: disable Bambu cloud telemetry before DLL start() (#13898)

* privacy: disable Bambu cloud telemetry before DLL start()
This commit is contained in:
SoftFever
2026-05-28 17:57:11 +08:00
committed by GitHub
parent 69e16cd7ef
commit 460e248aed
3 changed files with 20 additions and 10 deletions

View File

@@ -3349,6 +3349,8 @@ bool GUI_App::on_init_network(bool try_backup)
std::string country_code = app_config->get_country_code();
m_agent->set_country_code(country_code);
m_agent->start();
// Orca: disable Bambu telemetry up-front (before any login) so it never starts.
check_track_enable();
}
// When using Orca cloud alongside the BBL network plugin, the BBL DLL agent still
@@ -3365,6 +3367,12 @@ bool GUI_App::on_init_network(bool try_backup)
bbl.init_log();
bbl.set_cert_file(resources_dir() + "/cert", "slicer_base64.cer");
bbl.set_country_code(app_config->get_country_code());
// Orca: disable Bambu telemetry before start() so the DLL never spins up tracking
// workers. This covers the case where the BBL plugin is loaded for LAN discovery
// but the user has not registered BBL_CLOUD_PROVIDER (so m_agent->track_enable
// would not reach this DLL instance).
bbl.track_enable(false);
bbl.track_remove_files();
bbl.start();
}
}
@@ -4970,7 +4978,7 @@ void GUI_App::on_user_login_handle(wxCommandEvent &evt)
void GUI_App::check_track_enable()
{
// Orca: alaways disable track event
// Orca: telemetry only exists on the BBL cloud agent; always disable it.
if (m_agent) {
m_agent->track_enable(false);
m_agent->track_remove_files();

View File

@@ -582,21 +582,22 @@ int NetworkAgent::get_my_token(std::string ticket, unsigned int* http_code, std:
return -1;
}
int NetworkAgent::track_enable(bool enable, const std::string& provider)
int NetworkAgent::track_enable(bool enable)
{
this->enable_track = enable;
const auto cloud_agent = get_cloud_agent(provider);
// Orca cloud has no telemetry; the only cloud agent that tracks events is BBL.
this->enable_track = enable;
const auto cloud_agent = get_cloud_agent(BBL_CLOUD_PROVIDER);
if (cloud_agent)
return cloud_agent->track_enable(enable);
return -1;
return 0;
}
int NetworkAgent::track_remove_files(const std::string& provider)
int NetworkAgent::track_remove_files()
{
const auto cloud_agent = get_cloud_agent(provider);
const auto cloud_agent = get_cloud_agent(BBL_CLOUD_PROVIDER);
if (cloud_agent)
return cloud_agent->track_remove_files();
return -1;
return 0;
}
int NetworkAgent::track_event(std::string evt_key, std::string content, const std::string& provider)

View File

@@ -118,8 +118,9 @@ public:
int get_model_mall_detail_url(std::string* url, std::string id, const std::string& provider = ORCA_CLOUD_PROVIDER);
int get_my_profile(std::string token, unsigned int* http_code, std::string* http_body, const std::string& provider = ORCA_CLOUD_PROVIDER);
int get_my_token(std::string ticket, unsigned int* http_code, std::string* http_body, const std::string& provider = ORCA_CLOUD_PROVIDER);
int track_enable(bool enable, const std::string& provider = ORCA_CLOUD_PROVIDER);
int track_remove_files(const std::string& provider = ORCA_CLOUD_PROVIDER);
// Orca: telemetry only exists on the BBL cloud agent (Orca cloud has no track events).
int track_enable(bool enable);
int track_remove_files();
int track_event(std::string evt_key, std::string content, const std::string& provider = ORCA_CLOUD_PROVIDER);
int track_header(std::string header, const std::string& provider = ORCA_CLOUD_PROVIDER);
int track_update_property(std::string name, std::string value, std::string type = "string", const std::string& provider = ORCA_CLOUD_PROVIDER);