sometimes menshen returns `404 page not found` for `/api/5/openvpn/cert`
pea@peabox:menshen curl -v localhost:8443/api/5/openvpn/cert -H "Host: localhost:8443" -H "User-Agent: Go-http-client/1.1" -H "Accept: application/json" -H "Accept-Encoding: gzip"
* Host localhost:8443 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
* Trying [::1]:8443...
* Connected to localhost (::1) port 8443
* using HTTP/1.x
> GET /api/5/openvpn/cert HTTP/1.1
> Host: localhost:8443
> User-Agent: Go-http-client/1.1
> Accept: application/json
> Accept-Encoding: gzip
>
* Request completely sent off
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Content-Type: text/plain; charset=UTF-8
< Date: Wed, 16 Oct 2024 17:30:59 GMT
< Content-Length: 19
<
404 page not found
* Connection #0 to host localhost left intact
But then in the next run it works:
pea@peabox:menshen curl -v localhost:8443/api/5/openvpn/cert -H "Host: localhost:8443" -H "User-Agent: Go-http-client/1.1" -H "Accept: application/json" -H "Accept-Encoding: gzip"
* Host localhost:8443 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
* Trying [::1]:8443...
* Connected to localhost (::1) port 8443
* using HTTP/1.x
> GET /api/5/openvpn/cert HTTP/1.1
> Host: localhost:8443
> User-Agent: Go-http-client/1.1
> Accept: application/json
> Accept-Encoding: gzip
>
* Request completely sent off
< HTTP/1.1 200 OK
< Cache-Control: no-cache
< Content-Type: text/plain; charset=UTF-8
< Date: Wed, 16 Oct 2024 17:32:59 GMT
< Transfer-Encoding: chunked
<
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAxD6dEzO7ylbfEZ8bW0Y89yBMxwbqm+ZRJJJ6fMGyzXCwQjWM
KBNensBD5m14SpjRd+B5XMra/UdpO420uycuLGyPfTtDIQKZNP2Y2QLg7kg1GS62
eRbmpO7i+ZD3tBG5YWKGpY3t3WC4B+2c0de+N3ss22kiyShmLzhfGm8HATVAln0I
RV2FdKHOYo26EWTq/8L45wfqi4yLTkrdFpFbb/6qgkzXJ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jOPQQDAgNHADBEAiBjR1aJxZu9
FfF1+BhiP/9xW21pdzjbX4ScFZuJjJzs9QIgSQCdBPuBUKj60raOgE3w4PNLDJh0
2UvUV5vBsEWNYBs=
-----END CERTIFICATE-----
* Connection #0 to host localhost left intact
I'm using latest menshen (main with 364d0626).
go run ./cmd/menshen/main.go \
--verbose \
--from-eip-url https://black.riseup.net:4430/3/config/eip-service.json \
--allow-bridge-list \
--allow-gateway-list \
--client-cert-url https://api.black.riseup.net:4430/3/cert \
--ca-file riseup-ca.pem \
--from-provider-json-file provider.json
}