Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support HTTPS connections #7

Closed
thespad opened this issue May 30, 2023 · 5 comments
Closed

Support HTTPS connections #7

thespad opened this issue May 30, 2023 · 5 comments

Comments

@thespad
Copy link

thespad commented May 30, 2023

I expose my Adguard instances over https and right now it doesn't appear possible to connect regardless of the IP/hostname or port provided.

I don't know Rust well, but I'm guessing this is hardcoding http as the protocol scheme https://github.com/Lissy93/AdGuardian-Term/blob/main/src/main.rs#L27

@Dean-Coakley
Copy link

@Lissy93 Do you think making the protocol configurable would resolve this issue or do you expect there is more involved?

If so would it make sense to add and env var for protocol? I'm new to rust but I'm not seeing how/if those values are defaulted if not set?

@Lissy93
Copy link
Owner

Lissy93 commented May 31, 2023

This deffo makes sense to implement (for all you sensible people who use https!)

I think you're right @thespad with your suggestion to make the protocol user-settable. I've implemented this, and updated the docs in #9 which I'll merge shortly :)

@hermanops
Copy link

when I use --adguard-protocol "https" it still wants to do http??

ADGUARD_IP is set to 192.168.11.53
ADGUARD_PORT is set to 443
ADGUARD_PROTOCOL is set to http
ADGUARD_USERNAME is set to admin
ADGUARD_PASSWORD is set to ***

Verifying connection to your AdGuard instance...
Failed to connect to AdGuard at 192.168.11.53:443

@Dean-Coakley
Copy link

Looking at the doc/PR I think the cli arg --adguard-protocol does not exist. (https://github.com/Lissy93/AdGuardian-Term#configuring)

You must set the environment variable ADGUARD_PROTOCOL=https

@hermanops
Copy link

Running the Linux executable adguardian-x86_64 with the hostname in _IP gives:
error trying to connect: invalid peer certificate contents: invalid peer certificate: UnknownIssuer

Running it with the IP address gives:
error trying to connect: presented server name type wasn't supported

curl works fine on the control/status endpoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants