Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions firmware/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
menu "StackChan Server"

config STACKCHAN_SERVER_URL
string "StackChan server base URL"
default "http://47.113.125.164:12800"
help
Base URL (scheme + host + port, no trailing slash) of the StackChan backend.
The HAL composes endpoint paths like /stackChan/device/user,
/stackChan/apps and /stackChan/ws from this base. Override in your
sdkconfig.defaults.local to point at a self-hosted deployment.

endmenu

menu "Xiaozhi Assistant"

config OTA_URL
Expand Down
5 changes: 5 additions & 0 deletions firmware/main/hal/utils/secret_logic/secret_logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@
* SPDX-License-Identifier: MIT
*/
#include "secret_logic.h"
#include <sdkconfig.h>

namespace secret_logic {

__attribute__((weak)) std::string get_server_url()
{
#ifdef CONFIG_STACKCHAN_SERVER_URL
return CONFIG_STACKCHAN_SERVER_URL;
#else
return "http://localhost:3000";
#endif
}

__attribute__((weak)) std::string generate_auth_token()
Expand Down