uklans / cache-domains

Domain Names required for LAN Content Cache DNS spoofing
MIT License
566 stars 525 forks source link

Can't cache Steam on a Comcast connection #216

Closed miketweaver closed 1 year ago

miketweaver commented 1 year ago

Describe the issue you are having

Client is not connecting to the LAN Cache server

Describe your setup?

I am using the steamcache docker & monolithic server in generic mode.

Are you running sniproxy

No

DNS Configuration

root@lancache:~/lancache# cat docker-compose.yml 
version: '2'
services:
  dns:
    image: lancachenet/lancache-dns:latest
    env_file: .env
    restart: unless-stopped
    ports:
      - ${DNS_BIND_IP}:53:53/udp
      - ${DNS_BIND_IP}:53:53/tcp

## HTTPS requests are now handled in monolithic directly
## you could choose to return to sniproxy if desired
#
#  sniproxy:
#    image: lancachenet/sniproxy:latest
#    env_file: .env
#    restart: unless-stopped
#    ports:
#      - 443:443/tcp

  monolithic:
    image: lancachenet/monolithic:latest
    env_file: .env
    restart: unless-stopped
    ports:
      - 80:80/tcp
      - 443:443/tcp
    volumes:
      - ${CACHE_ROOT}/cache:/data/cache
      - ${CACHE_ROOT}/logs:/data/logs

.env file:

root@lancache:~/lancache# cat .env 
## See the "Settings" section in README.md for more details

## Set this to true if you're using a load balancer, or set it to false if you're using seperate IPs for each service.
## If you're using monolithic (the default), leave this set to true
USE_GENERIC_CACHE=true

## IP addresses that the lancache monolithic instance is reachable on
## Specify one or more IPs, space separated - these will be used when resolving DNS hostnames through lancachenet-dns. Multiple IPs can improve cache priming performance for some services (e.g. Steam)
## Note: This setting only affects DNS, monolithic and sniproxy will still bind to all IPs by default
LANCACHE_IP=192.168.2.15

## IP address on the host that the DNS server should bind to
DNS_BIND_IP=192.168.2.15

## DNS Resolution for forwarded DNS lookups
UPSTREAM_DNS=192.168.2.1

## Storage path for the cached data
## Note that by default, this will be a folder relative to the docker-compose.yml file
CACHE_ROOT=/cache

## Change this to customise the size of the disk cache (default 2000000m)
## If you have more storage, you'll likely want to increase this
## The cache server will prune content on a least-recently-used basis if it
## starts approaching this limit.
## Set this to a little bit less than your actual available space 
CACHE_DISK_SIZE=980000m

## Change this to allow sufficient index memory for the nginx cache manager (default 500m)
## We recommend 250m of index memory per 1TB of CACHE_DISK_SIZE 
CACHE_INDEX_SIZE=500m

## Change this to limit the maximum age of cached content (default 3650d)
CACHE_MAX_AGE=3650d

## Set the timezone for the docker containers, useful for correct timestamps on logs (default Europe/London)
## Formatted as tz database names. Example: Europe/Oslo or America/Los_Angeles
TZ=America/Denver

Client Output

PS C:\Users\miket> nslookup [lancache.steamcontent.com](http://lancache.steamcontent.com/)
Server:  UnKnown
Address:  192.168.2.15

Non-authoritative answer:
Name:    [steam.cache.lancache.net](http://steam.cache.lancache.net/)
Address:  192.168.2.15
Aliases:  [lancache.steamcontent.com](http://lancache.steamcontent.com/)

Logs output

Here are the logs I see using tail -f /cache/logs/*.log

==> /cache/logs/upstream-error.log <==
2022/12/28 21:38:45 [error] 1850#1850: *11 edge.steam-dns.top.comcast.net could not be resolved (3: Host not found), client: 127.0.0.1, server: , request: "GET /depot/13241/manifest/4273806708369366588/5/3512876997213972479 HTTP/1.0", host: "edge.steam-dns.top.comcast.net"

2022/12/28 22:00:04 [error] 1817#1817: *15 edge.steam-dns.top.comcast.net could not be resolved (3: Host not found), client: 127.0.0.1, server: , request: "GET /depot/252951/manifest/3006312453893034243/5/7631369495757810800 HTTP/1.0", host: "edge.steam-dns.top.comcast.net"

==> /cache/logs/access.log <==
[steam] 192.168.2.100 / - - - [28/Dec/2022:22:00:04 -0700] "GET /depot/252951/manifest/3006312453893034243/5/7631369495757810800 HTTP/1.1" 502 182 "-" "Valve/Steam HTTP Client 1.0" "MISS" "edge.steam-dns.top.comcast.net" "-"

After it fails to work on "edge.steam-dns.top.comcast.net", it starts using standard Steam servers. Since those were removed, it no longer works.

ewancolyer commented 1 year ago

Id suggest dropping note on this PR where the the potential of adding the old domains back is being discussed. https://github.com/uklans/cache-domains/pull/215

mintopia commented 1 year ago

So edge.steam-dns.top.comcast.net resolves correctly for me:

Default Server:  one.one.one.one
Address:  1.1.1.1

> edge.steam-dns.top.comcast.net
Server:  one.one.one.one
Address:  1.1.1.1

Non-authoritative answer:
Name:    edge.steam-dns.top.comcast.net
Addresses:  2001:558:fe02::9
          2001:558:fe02::a
          2001:558:fe02::29
          2001:558:fe02::35
          2001:558:fe03:89::2
          2001:558:fe03:300::2
          76.96.121.122
          96.96.229.137
          96.96.229.138
          96.96.229.169
          96.96.229.181
          96.113.72.226

The place to investigate is why lancache was unable to resolve that hostname.

miketweaver commented 1 year ago

I'll look into that. If I can get it to resolve and it doesn't fix it, I'll reopen the issue.