forked from KNEMC/KLALB
feat(config): switch webPort to URI-style webListen address
- replace integer webPort with MultiProtocolSocketAddress webListen (default: http://0.0.0.0:4665) in controller config - rename Swing UI item to "Web API 监听地址" and validate as full URI - update WebServer binding to honor configured host and port - normalize legacy webPort integers to http://0.0.0.0:<port> on load and keep JSON API backward compatibility - update i18n keys in zh_CN and en_US resource bundles - update root klalb-config.json and AGENTS.md documentation
This commit is contained in:
@@ -108,12 +108,12 @@ public class KLALBMain {
|
||||
case "web":
|
||||
if(sc.length >= 2) {
|
||||
String action = sc[1].toLowerCase();
|
||||
if("start".equals(action)) {
|
||||
int p = 4665;
|
||||
if(sc.length >= 3) {
|
||||
try { p = Integer.parseInt(sc[2]); } catch (NumberFormatException ignored) {}
|
||||
} else if(kpcje.getControllerConfig() != null && kpcje.getControllerConfig().getWebPort() > 0) {
|
||||
p = kpcje.getControllerConfig().getWebPort();
|
||||
if("start".equals(action)) {
|
||||
int p = 4665;
|
||||
if(sc.length >= 3) {
|
||||
try { p = Integer.parseInt(sc[2]); } catch (NumberFormatException ignored) {}
|
||||
} else if(kpcje.getControllerConfig() != null && kpcje.getControllerConfig().getWebListen() != null) {
|
||||
p = kpcje.getControllerConfig().getWebListen().getPort();
|
||||
}
|
||||
try {
|
||||
kpcje.enableWebServer(p);
|
||||
|
||||
Reference in New Issue
Block a user