Browse Source

Fixed unable to remove new streamproxy bug

Toby Chui 4 months ago
parent
commit
80412f79a8

File diff suppressed because it is too large
+ 224 - 187
mod/geodb/geoipv4.csv


File diff suppressed because it is too large
+ 848 - 100
mod/geodb/geoipv6.csv


+ 5 - 0
mod/streamproxy/streamproxy.go

@@ -220,6 +220,11 @@ func (m *Manager) EditConfig(configUUID string, newName string, newListeningAddr
 }
 
 func (m *Manager) RemoveConfig(configUUID string) error {
+	//Remove the config from file
+	err := os.Remove(filepath.Join(m.Options.ConfigStore, configUUID+".config"))
+	if err != nil {
+		return err
+	}
 	// Find and remove the config with the specified UUID
 	for i, config := range m.Configs {
 		if config.UUID == configUUID {

+ 15 - 14
start.go

@@ -12,7 +12,6 @@ import (
 	"imuslab.com/zoraxy/mod/access"
 	"imuslab.com/zoraxy/mod/acme"
 	"imuslab.com/zoraxy/mod/auth"
-	"imuslab.com/zoraxy/mod/auth/sso"
 	"imuslab.com/zoraxy/mod/database"
 	"imuslab.com/zoraxy/mod/dockerux"
 	"imuslab.com/zoraxy/mod/dynamicproxy/loadbalance"
@@ -128,19 +127,21 @@ func startupSequence() {
 		panic(err)
 	}
 
-	//Create an SSO handler
-	ssoHandler, err = sso.NewSSOHandler(&sso.SSOConfig{
-		SystemUUID:       nodeUUID,
-		PortalServerPort: 5488,
-		AuthURL:          "http://auth.localhost",
-		Database:         sysdb,
-		Logger:           SystemWideLogger,
-	})
-	if err != nil {
-		log.Fatal(err)
-	}
-	//Restore the SSO handler to previous state before shutdown
-	ssoHandler.RestorePreviousRunningState()
+	/*
+		//Create an SSO handler
+		ssoHandler, err = sso.NewSSOHandler(&sso.SSOConfig{
+			SystemUUID:       nodeUUID,
+			PortalServerPort: 5488,
+			AuthURL:          "http://auth.localhost",
+			Database:         sysdb,
+			Logger:           SystemWideLogger,
+		})
+		if err != nil {
+			log.Fatal(err)
+		}
+		//Restore the SSO handler to previous state before shutdown
+		ssoHandler.RestorePreviousRunningState()
+	*/
 
 	//Create a statistic collector
 	statisticCollector, err = statistic.NewStatisticCollector(statistic.CollectorOption{

+ 1 - 1
tools/provider_config_updater/acmedns/acmedns.go

@@ -139,7 +139,7 @@ import (
 
 //name is the DNS provider name, e.g. cloudflare or gandi
 //JSON (js) must be in key-value string that match ConfigableFields Title in providers.json, e.g. {"Username":"far","Password":"boo"}
-func GetDNSProviderByJsonConfig(name string, js string, propagationTimeout int64)(challenge.Provider, error){
+func GetDNSProviderByJsonConfig(name string, js string, propagationTimeout int64, pollingInterval int64)(challenge.Provider, error){
 	pgDuration := time.Duration(propagationTimeout) * time.Second
 	plInterval := time.Duration(pollingInterval) * time.Second
 	switch name {

+ 13 - 1
web/components/sso.html

@@ -1,3 +1,14 @@
+<div class="standardContainer">
+    <div class="ui basic segment">
+        <div class="ui message">
+            <div class="header">
+                Work in Progress
+            </div>
+            <p>The SSO feature is currently under development.</p>
+        </div>
+    </div>
+</div>
+<!-- 
 <div class="standardContainer">
     <div class="ui basic segment">
         <h2>Zoraxy SSO / Oauth</h2>
@@ -366,4 +377,5 @@
         //Open the registered user management snippet
         showSideWrapper("snippet/sso_user.html");
     }
-</script>
+</script>
+-->

+ 1 - 1
web/snippet/acme.html

@@ -455,7 +455,7 @@
               defaultIntValue = 30;
               defaultMinValue = 10;
             }else if (key == "PropagationTimeout"){
-              defaultIntValue = 600;
+              defaultIntValue = 300;
               defaultMinValue = 60;
             }
             optionalFieldsHTML += (`<div class="ui fluid labeled dnsConfigField small input" key="${key}" style="margin-top: 0.2em;">

Some files were not shown because too many files changed in this diff