From 46915bf6d1d368ed638c852e8de38205b76da979 Mon Sep 17 00:00:00 2001 From: KarnerF Date: Mon, 31 Aug 2026 18:13:16 +0200 Subject: [PATCH] Change default port from 7070 to 7777 --- README.md | 4 ++-- main.c | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cf21c8e..a410da4 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Web-based config UI for [ShadowMountPlus](https://github.com/drakmor/ShadowMountPlus) running as a PS5 payload. Configure all SM settings from any browser, manage config backups, view the debug log, and autostart SM on launch. -Opens at **http://\:7070** +Opens at **http://\:7777** --- @@ -26,7 +26,7 @@ make ## Usage 1. Load `SMPlusGui_v1.0.0.elf` -2. Open `http://:7070` +2. Open `http://:7777` 3. Change settings, hit **Save** --- diff --git a/main.c b/main.c index b4de27c..8a65e0f 100644 --- a/main.c +++ b/main.c @@ -83,7 +83,8 @@ static void notify(const char *msg) { _notify_send(msg, NULL); } typedef struct { int auto_start; int icon_always_front; - int always_restart_sm; /* 0=only start if not running (default), 1=always restart */ + int always_restart_sm; + int http_port; /* 0 = use default (7777) */ char preferred_elf[512]; char extra_scan[PREFS_MAX_EXTRA][256]; int extra_scan_count; @@ -98,6 +99,7 @@ static void read_prefs(SMPrefs *p) { if(strncmp(line,"auto_start=",11)==0) p->auto_start=atoi(line+11); else if(strncmp(line,"icon_always_front=",18)==0) p->icon_always_front=atoi(line+18); else if(strncmp(line,"always_restart_sm=",18)==0) p->always_restart_sm=atoi(line+18); + else if(strncmp(line,"http_port=",10)==0) p->http_port=atoi(line+10); else if(strncmp(line,"preferred_elf=",14)==0) strncpy(p->preferred_elf,line+14,511); else if(strncmp(line,"extra_scan=",11)==0&&p->extra_scan_countextra_scan[p->extra_scan_count++],line+11,255); @@ -110,6 +112,7 @@ static void write_prefs(const SMPrefs *p) { fprintf(f,"auto_start=%d\n",p->auto_start); fprintf(f,"icon_always_front=%d\n",p->icon_always_front); fprintf(f,"always_restart_sm=%d\n",p->always_restart_sm); + if(p->http_port>0) fprintf(f,"http_port=%d\n",p->http_port); fprintf(f,"preferred_elf=%s\n",p->preferred_elf); for(int i=0;iextra_scan_count;i++) fprintf(f,"extra_scan=%s\n",p->extra_scan[i]); fclose(f); @@ -297,7 +300,7 @@ static void terminate_existing_instances(const char *name) { #define CONFIG_PATH "/data/shadowmount/config.ini" #define BAK_DIR "/data/SMPlusGui/backups" #define ICO(n) "" -#define HTTP_PORT "7070" +#define HTTP_PORT "7777" #define MAX_PATHS 20 #define PATH_LEN 256 #define MAX_IMG 50 @@ -3232,6 +3235,7 @@ int payload_main(void) { signal(SIGCONT, on_resume); (void)syscall(SYS_thr_set_name,-1,PAYLOAD_NAME); terminate_existing_instances(PAYLOAD_NAME); + { SMPrefs _sp; read_prefs(&_sp); if(_sp.http_port>1024&&_sp.http_port<65535) snprintf((char*)HTTP_PORT,8,"%d",_sp.http_port); (void)_sp; } char _ip[48] = {0}; get_local_ip(_ip, sizeof(_ip)); char _url[64];