tpill90 / battlenet-lancache-prefill

CLI tool to automatically prefill a Lancache with Battle.Net games
https://tpill90.github.io/battlenet-lancache-prefill/
MIT License
72 stars 10 forks source link

Feature Request - Command line option to override DNS #79

Closed Ancient123 closed 1 year ago

Ancient123 commented 1 year ago

Providing an option to point at a different DNS server, or alternately manually giving a known address for the cache server would be useful.

tpill90 commented 1 year ago

@Ancient123 Could I ask what your use case is for this? I'd like to know more about what you're trying to do with this, or what you would like to be using this for.

Ancient123 commented 1 year ago

So when I am prepping a cache server for an event I don't always want to set up an entire environment, so being able to point a VM (or my box) with the prefill tools on it at the cache server, without fiddling with local DNS, is useful.

tpill90 commented 1 year ago

Do you ever run the prefill directly on the host itself? It should pick up that there is a cache server there even without Lancache DNS running

Ancient123 commented 1 year ago

Oh if there is a cache server on localhost it should pick it up? Let me test that on my setup really quick and see...

tpill90 commented 1 year ago

Yep. It will actually check a whole bunch of places for most of the use cases people have. Ex, running on windows, cache host, docker, and others

Ancient123 commented 1 year ago

Weird. Doesn't seem to work for me that way...

ancients@lancache:~/BattleNetPrefill-1.5.0-linux-x64$ docker ps -a
CONTAINER ID   IMAGE                             COMMAND                  CREATED             STATUS             PORTS                                          NAMES
0daea7a2b828   lancachenet/monolithic:latest     "/bin/bash -e /init/…"   About an hour ago   Up About an hour   10.99.0.2:80->80/tcp, 10.99.0.2:443->443/tcp   lancache_monolithic_1
5af38e38847f   lancachenet/lancache-dns:latest   "/bin/bash -e /init/…"   5 days ago          Up About an hour   10.99.0.2:53->53/tcp, 10.99.0.2:53->53/udp     lancache_dns_1
ancients@lancache:~/BattleNetPrefill-1.5.0-linux-x64$ ./BattleNetPrefill prefill -p hsb
[10:14:43 PM] Prefilling 1 products

 Warning!  level3.blizzard.com is resolving to a public IP address (8.253.69.249).
 Prefill will download directly from the internet, and will not be cached by Lancache.
Ancient123 commented 1 year ago

Oh maybe its because it is bound to a specific IP (10.99.0.2) in this case.

Ancient123 commented 1 year ago

Cool switching that to 0.0.0.0 for the port binds did the trick. Yeah DNS definitely isn't needed if it works this way no problem.

tpill90 commented 1 year ago

Do you happen to have more than one ip? Also are you using host networking?

tpill90 commented 1 year ago

Nvm just saw your message that it's working. Good to close this then?

Ancient123 commented 1 year ago

Nvm just saw your message that it's working. Good to close this then?

Absolutely