Closed ellisonpatterson closed 2 years ago
Hey,
What traefik version are you running?
There is no code written to handle IPv6 ... so could be that which is what is causing the panic.
Try remove the IPv6 entries and see if the plugin stops panicking?
Traefik version is 2.6.3.
I removed the IPv6 entries and same error unfortunately. Is there a way I can get get more info for you?
EDIT:
Verbose log is showing me a RemoteAddr of 172.70.230.151:13694
before the panic occurs.
I think there might be an issue with array handling still.
Try with just 1 ip address and see if it's all dandy?
Also, remove the 127.0.0.1 from the trust ip - that is invalid (shouldn't cause an issue, but check anyway).
Remote addr shouldn't contain the port when flowing through the plugin, so technically should be fine....
Does this happen on any request, or only ones from the trusted IP list?
Will spin up a debug instance with the above config and check it out tomorrow for you.
Same issue:
time="2022-07-08T14:56:15+02:00" level=error msg="plugins-storage/sources/gop-2063719338/src/github.com/BetterCorp/cloudflarewarp/cloudflarewarp.go:62:5: panic" plugin=plugin-traefik-cf-warp module=github.com/BetterCorp/cloudflarewarp
time="2022-07-08T14:57:42+02:00" level=error msg="plugins-storage/sources/gop-2063719338/src/github.com/BetterCorp/cloudflarewarp/cloudflarewarp.go:62:5: panic" plugin=plugin-traefik-cf-warp module=github.com/BetterCorp/cloudflarewarp
time="2022-07-08T14:58:23+02:00" level=error msg="plugins-storage/sources/gop-2063719338/src/github.com/BetterCorp/cloudflarewarp/cloudflarewarp.go:62:5: panic" plugin=plugin-traefik-cf-warp module=github.com/BetterCorp/cloudflarewarp
time="2022-07-08T14:59:22+02:00" level=error msg="plugins-storage/sources/gop-2063719338/src/github.com/BetterCorp/cloudflarewarp/cloudflarewarp.go:62:5: panic" plugin=plugin-traefik-cf-warp module=github.com/BetterCorp/cloudflarewarp
Config:
cloudflarewarp:
plugin:
traefik-cf-warp:
trustip:
# Cloudflared docker network IP
- 172.19.0.54/32
# - 172.19.0.0/16
This is the current working configuration, if I use the commented subnet entry, it doesn't work, the "proxy" .54 is not trusted using the subnet. If I use the .54 entry, it works.
There's a bug, let me know if I can provide you with anything else useful...
Traefik stops as soon as v2.0.0 of the plugin gets loaded.
static config:
plugins:
traefik-cf-warp:
modulename: github.com/BetterCorp/cloudflarewarp
version: v2.0.0
dynamic config:
cloudflare-realip:
plugin:
traefik-cf-warp:
trustip:
- "172.19.0.0/16"
log:
time="2022-07-28T02:45:36+02:00" level=info msg="Many thanks for contributing to Traefik's improvement by allowing us to receive anonymous information from your configuration."
time="2022-07-28T02:45:36+02:00" level=info msg="Help us improve Traefik by leaving this feature on :)"
time="2022-07-28T02:45:36+02:00" level=info msg="More details on: https://doc.traefik.io/traefik/contributing/data-collection/"
time="2022-07-28T02:45:36+02:00" level=warning msg="Traefik Pilot is deprecated and will be removed soon. Please check our Blog for migration instructions later this year."
time="2022-07-28T02:45:36+02:00" level=debug msg="loading of plugin: traefik-cf-warp: github.com/BetterCorp/cloudflarewarp@v2.0.0"
Error response from daemon: Container 31dff307d99886ad4af130bc27487412b238feb0b056017bfa27c6c7072a2555 is restarting, wait until the container is running
I'm seeing this error:
Config: