tobychui / zoraxy

A general purpose HTTP reverse proxy and forwarding tool. Now written in Go!
https://zoraxy.aroz.org
GNU Affero General Public License v3.0
3.09k stars 188 forks source link

Configuration for OVH DNS Challenge #161

Closed tadikwa closed 6 months ago

tadikwa commented 6 months ago

I have some problems to configure OVH DNS Challenge

I have this field with the ACME TOOL : FieldType, SubDomain, Target and Zone 2024-05-20_15h00_57

But, normally with Nginx Proxy Manager (for example), i need to use this variables : application_key, application_secret, consumer_key and endpoint 2024-05-20_15h01_25 2024-05-20_15h09_09

It is a bug of config parser or i didn't understand how to configure ?

tobychui commented 6 months ago

This seems like a bug in the config parser. Let me check it in a moment.

tobychui commented 6 months ago

Ok, this seems to a bug inside the acmedns generation tool. For a quick fix, replace this line in providers.json in the acmedns module with the following json at key = "ovh" and build from source again.

"ovh": {
  "Name": "ovh",
  "ConfigableFields": [
   {
    "Title": "APIEndpoint",
    "Datatype": "string"
   },
   {
    "Title": "ApplicationKey",
    "Datatype": "string"
   },
   {
    "Title": "ApplicationSecret",
    "Datatype": "string"
   },
   {
    "Title": "ConsumerKey",
    "Datatype": "string"
   }
  ],
  "HiddenFields": [
   {
    "Title": "OAuth2Config",
    "Datatype": "*OAuth2Config"
   },
   {
    "Title": "PropagationTimeout",
    "Datatype": "time.Duration"
   },
   {
    "Title": "PollingInterval",
    "Datatype": "time.Duration"
   },
   {
    "Title": "HTTPClient",
    "Datatype": "*http.Client"
   }
  ]
 }

This shd get the problem fixed. 圖片

tadikwa commented 6 months ago

Ah yes ok I see. However, I am running the version in Docker. Can I also make the modification on the online container?

tobychui commented 6 months ago

@tadikwa I guess you can. I am not experience with docker but in theory this should work.

  1. Cross compile Zoraxy on your computer for your server's CPU architecture & OS, e.g. GOOS=linux GOARCH=amd64 go build -o zoraxy-linux-amd64
  2. ssh into your container, stop zoraxy
  3. Transfer the new binary from your computer to the container and overwrite the old version of zoraxy binary executable
  4. Restart zoraxy service
tadikwa commented 6 months ago

ok, this is out of my scope.

I prefer to wait for a new build and update my docker image ;)

tobychui commented 6 months ago

@tadikwa As this is only a front-end issue, you can hack it by using the F12 developer console and enter this 🤔

$.ajax({
        url: "/api/acme/autoRenew/setDNS",
        method: "POST",
        data: {
          filename: your_domain_with_*_replaced_by_underscore,
          dnsProvider: "ovh",
          dnsCredentials: JSON.stringify({
               "ApplicationKey":"",
               "ApplicationSecret":"",
               "ConsumerKey":""
          }),
        }
});

and then get certificate with all fields blank.

PassiveLemon commented 6 months ago

You could clone the repo, change the line, and then rebuild the container

barto95100 commented 6 months ago

Maybe upgrade the official container zoraxy to have this change ? most simply for all user :)

barto95100 commented 6 months ago

any news ?

tobychui commented 6 months ago

any news ?

FYI, the changes required for fixing this bug has already been pushed into the main branch.

Release build are not gonna be that fast though (still working on something related to other issues)

barto95100 commented 6 months ago

OK I understand

it's a shame since I opened the first ticket to indicate the wildcard problem with ovh and when the feature is available there is a bug (we are cursed lol)

we'll wait... (ovh users)

tobychui commented 6 months ago

Fixed in v3.0.5.