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

Way to differentiate proxied and non proxied domains with docker compose #227

Closed
nikkopt opened this issue Oct 17, 2022 · 5 comments
Closed

Comments

@nikkopt
Copy link

nikkopt commented Oct 17, 2022

I can't seem to find this information in the readme page.
What's the right way to tell the script to proxy the domain foo.bar and not proxy the subdomain test.foo.bar with docker compose?
And while i'm at it. What about the TTL?
Also, if i write *.foo.bar , will the script update every single subdomain?
Thanks in advance.

@nikkopt nikkopt changed the title Way to diferenciate proxied and non proxied domains with docker compose Way to differentiate proxied and non proxied domains with docker compose Oct 17, 2022
@favonia
Copy link
Owner

favonia commented Oct 17, 2022

Thank you for opening the issue.

  1. The per-domain proxy setting is experimental and it's well-hidden in the setting section. I am planning to replace it with a new system. See Rewrite/simplify the template system #223. Do you like the new language?
  2. I am planning to remove the support of per-domain TTL due to the seemingly lack of usage. Do you have a use case? May I know what it is?
  3. *.foo.bar is a wildcard domain name and it is independent of other names such as test.foo.bar. It meant to cover only the domain names that would not otherwise exist. You can use hasSuffix("foo.bar") in the current system or sub(foo.bar) in the planned new system that would match both *.foo.bar and test.foo.bar.

As I am still working on the design and the new code, your feedback is important. In the meanwhile, as a workaround, you can run two instances to avoid the template system altogether.

@nikkopt
Copy link
Author

nikkopt commented Oct 17, 2022

I'm new to docker and i don't even know how to program. I'm using portainer to import compose files.
I'm not the best person to be asked if i like the new language because for me everything's the same. I'll just end up using the examples provided.
I asked about the TTL because i saw it mentioned on the readme but didn't see a way to use it with compose. To be honest i don't really need to use it, it was just curiosity.
About the domains, thanks, i get it now. I ended up using to instances like you proposed.
Thanks again.

@nikkopt nikkopt closed this as completed Oct 17, 2022
@favonia
Copy link
Owner

favonia commented Oct 17, 2022

Thank you for your feedback. I should probably explain more about wildcard domains in README. Let me know if something is not working---I made the tool for myself but I also want to make it useful for others. The only downside of multiple instances is that they would eat up more memory and their cache cannot be shared, but if you can afford more memory and/or less efficient network usage, they would work perfectly fine. Again, let me know if something is not working well. I need your feedback to improve this tool further.

@favonia
Copy link
Owner

favonia commented Oct 28, 2022

@nikkopt FYI: #223 was implemented and has been shipped with 1.7.1. It is still "experimental" but I kind of like it (as I managed to implement this feature with a tiny and reasonably efficient parser), so maybe you can depend on it. See README for the documentation. You can use is(example.org) to proxy only the domain example.org and you can use logical operators to express more complicated logic. (Such as !is(example.org) to proxy everything except example.org.)

@nikkopt
Copy link
Author

nikkopt commented Oct 30, 2022

Tat was fast! At the moment i'm only using one domain. I'll try it as soon as i need it. I took a look at the readme and it looks pretty easy to use. Thanks a bunch!
Edit: by the way, i took me a while to find the new information. I didn't know i could click the text and it would expand to show more information... i'm new at this

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

2 participants