-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathdocker-compose.yml
100 lines (86 loc) · 3.37 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: lancache
services:
dns:
image: lancachenet/lancache-dns:latest
container_name: lancache-dns
restart: unless-stopped
environment:
LANCACHE_IP: 192.168.1.88
CACHE_DOMAINS_REPO: https://github.com/uklans/cache-domains.git
CACHE_DOMAINS_BRANCH: master
UPSTREAM_DNS: 1.1.1.1
USE_GENERIC_CACHE: 'true'
ports:
- target: 53
published: 53
protocol: tcp
- target: 53
published: 53
protocol: udp
network_mode: bridge
monolithic:
image: lancachenet/monolithic:latest
container_name: lancache-monolithic
restart: unless-stopped
environment:
CACHE_DOMAINS_REPO: https://github.com/uklans/cache-domains.git
CACHE_DOMAINS_BRANCH: master
UPSTREAM_DNS: 1.1.1.1
CACHE_DISK_SIZE: 2000g
CACHE_INDEX_SIZE: 500m
CACHE_MAX_AGE: 3650d
ports:
- target: 80
published: 80
protocol: tcp
- target: 443
published: 443
protocol: tcp
volumes:
- type: bind
source: /DATA/AppData/lancache/cache
target: /data/cache
- type: bind
source: /DATA/AppData/lancache/logs
target: /data/logs
network_mode: bridge
x-casaos:
architectures:
- amd64
author: Cp0204
developer: LanCache.net
category: Network
icon: https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/lancache/icon.png
screenshot_link:
- https://cdn.jsdelivr.net/gh/Cp0204/CasaOS-AppStore-Play@main/Apps/lancache/screenshot-1.png
store_app_id: lancache
main: monolithic
description:
en_us: Make the most of your network. Get more play for your gamers. Download your games once and serve them out to many people at your LAN. The principle is to set up the NAS as a DNS server, hijack HTTP traffic to the NAS, cache the downloaded game files, and distribute them at high speed by the NAS when downloading again.
zh_cn: 充分利用您的网络,为玩家带来更多乐趣。只需下载一次游戏,就可以向局域网中其他设备提供缓存高速下载。其原理是把NAS设为DNS服务器,劫持HTTP流量到NAS,缓存下载过的游戏文件,再次下载时由NAS高速分发。
tagline:
en_us: LAN Party game caching made easy
zh_cn: 局域网轻松使用游戏下载缓存
tips:
before_install:
en_us: |
After installation:
1. Change the `LANCACHE_IP` of lancache-dns to the NAS cache server IP.
2. Change /DATA/AppData/lancache/cache of lancache-monolithic to your cache directory.
3. set client DNS to NAS IP
In my testing, LanCache works provided:
- Clients only use IPv4, disable IPv6 in the system network, otherwise the system may prioritize DNS resolution with IPv6
- You must use ports 80 and 443 of the NAS, when the NAS acts as a pseudo HTTP(S) server.
zh_cn: |
安装后:
1. 更改lancache-dns的`LANCACHE_IP`为NAS缓存服务器IP
2. 更改lancache-monolithic的/DATA/AppData/lancache/cache为你的缓存目录
3. 设置客户端DNS为NAS IP
在我的实测中,LanCache生效的前提:
- 客户端仅用IPv4,在系统网络中禁用IPv6,否则系统可能会优先用IPv6的DNS解析
- 必须使用NAS的80、443端口,此时NAS作为伪HTTP(S)服务器
title:
en_us: LanCache
index: /
port_map: "80"
scheme: http