forked from lancachenet/lancachenet.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
117 lines (87 loc) · 7.06 KB
/
index.html
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="description" content="LanCache.Net : ">
<link rel="stylesheet" type="text/css" media="screen" href="stylesheets/stylesheet.css">
<title>LanCache.Net</title>
</head>
<body>
<!-- HEADER -->
<div id="header_wrap" class="outer">
<header class="inner">
<a id="forkme_banner" href="https://github.com/lancachenet">View on GitHub</a>
<h1 id="project_title">LanCache.Net</h1>
<h2 id="project_tagline"></h2>
</header>
</div>
<!-- MAIN CONTENT -->
<div id="main_content_wrap" class="outer">
<section id="main_content" class="inner">
<h1>
<a id="lancachenet" class="anchor" href="#lancachenet" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>SteamCache.Net is now LanCache.Net</h1>
<p>LanCache.Net provides the ability to reduce your Internet bandwidth consumption in scenarios where you have multiple PC gamers sharing the same Internet connection. Through the use of easy to deploy docker containers we aim to make it easy for you to get a local cache of steam's content servers up and running quickly.</p>
<p>The primary use case is gaming events, such as LAN parties, which need to be able to cope with hundreds or thousands of computers receiving an unannounced patch - without spending a fortune on internet connectivity. Other uses include smaller networks, such as Internet Cafes and home networks, where new games are regularly installed on multiple computers; or multiple independent operating systems on the same computer.</p>
<p>Originally designed as a caching solution purely for steam our latest docker image<a href="https://hub.docker.com/r/lancachenet/monolithic">lancachenet/monolithic</a> handles caching for a wide variety of gaming cdns (Steam, Blizzard, Origin to name a few) in one single easy to use docker container. Power users may prefer <a href="https://hub.docker.com/r/lancachenet/generic">lancachenet/generic</a> which is designed as a base for multiple instance, single cdn caches.</p>
<h2>
<a id="prerequisites" class="anchor" href="#prerequisites" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Prerequisites</h2>
<ul>
<li>
<p>Some local dedicated server hardware</p>
<p>Lots of RAM and a reasonably fast SSD or HDD is recommended. Regular commodity hardware (a single 2TB WD Black on an HP Microserver) can achieve peak throughputs of 30MB/s+ using this setup (depending on the specific content being served).</p>
</li>
<li>
<p>Linux with Docker</p>
<p>We suggest <a href="http://www.ubuntu.com/server">Ubuntu server</a> because it is really easy, but any Linux is ok. Running on Windows or Mac OS X is not recommended for performance reasons. Please see the <a href="https://docs.docker.com/engine/installation/">Docker installation instructions</a>.</p>
</li>
</ul>
<h2>
<a id="usage" class="anchor" href="#usage" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Usage</h2>
<p>As a quick "get started and go" run the following commands to bring up both a lancache server and a dns container, then configure your router/dhcp server to provide the IP of your lancache server as the dns server for the network.<br>
The <code>$LANCACHE_IP</code> is optionally included for each service to avoid conflicts with other currently running services like dnsmasq.</p>
<pre><code>export LANCACHE_IP=`hostname -I | cut -d' ' -f1`
docker run --restart unless-stopped --name lancache -v /cache/data:/data/cache -v /cache/logs:/data/logs -p $LANCACHE_IP:80:80 lancachenet/monolithic:latest
docker run --restart unless-stopped --name lancache-dns -p $LANCACHE_IP:53:53/udp -e USE_GENERIC_CACHE=true -e LANCACHE_IP=$LANCACHE_IP lancachenet/lancache-dns:latest
docker run --restart unless-stopped --name lancache-sniproxy -p $LANCACHE_IP:443:443 lancachenet/sniproxy:latest
echo Please configure your dhcp server to serve dns as $HOST_IP
</code></pre>
<p>For a more detailed guide, follow the below instead or check the readme's linked</p>
<ol>
<li>
<p>Run the <a href="https://github.com/lancachenet/monolithic">lancache</a> reverse proxy container</p>
<pre><code>docker run --restart unless-stopped --name lancache -v /cache/data:/data/cache -v /cache/logs:/data/logs -p 80:80 lancachenet/monolithic:latest
</code></pre>
<p>Note that this container requires the use of port 80 and so may not be run on the same machine as some other website. A dedicated caching server is recommended.</p>
</li>
<li>
<p>Run the <a href="https://github.com/lancachenet/lancache-dns">Lancache DNS</a> server container</p>
<p>When starting this container you need to pass in the IP address which the reverse proxy container is running on. Assuming that you're running both containers on the same machine then this will just be the IP address of that machine. This command looks up that IP and then starts the container using it.</p>
<div class="highlight highlight-source-shell"><pre><span class="pl-k">export</span> LANCACHE_IP=<span class="pl-s"><span class="pl-pds">`</span>hostname -I <span class="pl-k">|</span> head -n 1<span class="pl-pds">`</span></span><span class="pl-k">;</span>
docker run --restart unless-stopped --name lancache-dns -p 53:53/udp -e USE_GENERIC_CACHE=true -e LANCACHE_IP=<span class="pl-smi">$LANCACHE_IP</span> lancachenet/lancache-dns:latest
</pre></div>
<p>If you want to specify the IP then just place it in the run command like</p>
<div class="highlight highlight-source-shell"><pre>docker run --restart unless-stopped --name lancache-dns -p 53:53/udp -e USE_GENERIC_CACHE=true -e LANCACHE_IP=111.111.111.111 lancachenet/lancache-dns:latest</pre></div>
<p>Now anyone using this DNS server will have their steam traffic served by the cache.</p>
</li>
<li><p>Start the <a href="https://github.com/lancachenet/sniproxy">sniproxy</a> container<p>
<p>An increasing number of game providers are serving https traffic on the same endpoint as http, to ensure we don't break this secure traffic we need a sniproxy instance<p>
<pre><code>docker run --restart unless-stopped --name lancache-sniproxy -p 443:443 lancachenet/sniproxy:latest
</code></pre>
</li>
<li><p>Change your DHCP server to give out the IP address of the lancache DNS container as primary DNS</p></li>
</ol>
<p>Now, as people join your network they will automatically be configured to use the lancache (unless they've chosen to override DNS on their local PC).</p>
<h2>
<a id="running-on-startup" class="anchor" href="#running-on-startup" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Running on Startup</h2>
<p>Please follow the <a href="https://docs.docker.com/engine/admin/start-containers-automatically/">instructions in the Docker documentation</a> to run the container at startup.</p>
</section>
</div>
<!-- FOOTER -->
<div id="footer_wrap" class="outer">
<footer class="inner">
<p>Published with <a href="https://pages.github.com">GitHub Pages</a></p>
</footer>
</div>
</body>
</html>