You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If a misconfiguration happens, it crashes and does not recover
(I did not think to save the file that had the issue before I deleted it)
To Reproduce
Steps to reproduce the behavior:
Go to 'create proxy rules
Add a new proxy that is configured incorrectly
Expected behavior
Either it will recognize it is a bad config (if possible)
Or when restarting it will notify of an error but continue loading
Host Environment (please complete the following information):
Arch: AMD64
Device: Docker
OS: Debian 12.4
Additional context
Required fix was to delete the file for the proxy host i misconfigured
This is the error that occurs on startup with an invalid configuration
panic: runtime error: slice bounds out of range [-1:]
goroutine 31 [running]:
imuslab.com/zoraxy/mod/dynamicproxy.(*Router).PrepareProxyRoute(0xc0001aaa00?, 0x19d?)
/opt/zoraxy/source/mod/dynamicproxy/router.go:22 +0x3fe
main.LoadReverseProxyConfig({0xc0036943c0?, 0x15?})
/opt/zoraxy/source/config.go:72 +0xbf
main.ReverseProxtInit()
/opt/zoraxy/source/reverseproxy.go:112 +0x82f
main.main.func1()
/opt/zoraxy/source/main.go:163 +0xf
created by main.main in goroutine 1
/opt/zoraxy/source/main.go:162 +0x231
The text was updated successfully, but these errors were encountered:
@RickoT
Thanks for the issue.
This seems more like a feature request (check for improper config file from file) than a bug. Improper config file can cause crash which makes logical sense, and there are cleaning and validation code in place when you set it up using the web interface so this seems like an additional feature to me.
The line that caused such panic is from here
if domain[len(domain)-1:] == "/" { <-- This line
domain = domain[:len(domain)-1]
}
endpoint.Domain = domain
You leave the domain field empty or what? Can you show me your improper config file?
As the author of this issue is not responding, I will assume the error was come from empty string used in the domain field and has been fixed by checking if the field is empty. Closing this in v3.0.2.
Describe the bug
If a misconfiguration happens, it crashes and does not recover
(I did not think to save the file that had the issue before I deleted it)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Either it will recognize it is a bad config (if possible)
Or when restarting it will notify of an error but continue loading
Host Environment (please complete the following information):
Additional context
Required fix was to delete the file for the proxy host i misconfigured
This is the error that occurs on startup with an invalid configuration
panic: runtime error: slice bounds out of range [-1:]
goroutine 31 [running]:
imuslab.com/zoraxy/mod/dynamicproxy.(*Router).PrepareProxyRoute(0xc0001aaa00?, 0x19d?)
/opt/zoraxy/source/mod/dynamicproxy/router.go:22 +0x3fe
main.LoadReverseProxyConfig({0xc0036943c0?, 0x15?})
/opt/zoraxy/source/config.go:72 +0xbf
main.ReverseProxtInit()
/opt/zoraxy/source/reverseproxy.go:112 +0x82f
main.main.func1()
/opt/zoraxy/source/main.go:163 +0xf
created by main.main in goroutine 1
/opt/zoraxy/source/main.go:162 +0x231
The text was updated successfully, but these errors were encountered: