Browse Source

[nginx] add lanhost.top; [proxy] v2ray 4.x -> 5.x

main
64味小菜 3 years ago
parent
commit
11a1c1d989
  1. 27
      docker-compose.gen
  2. 6
      jellyfin/Dockerfile
  3. 2
      nginx/nginx/conf.d/aria2.conf
  4. 2
      nginx/nginx/conf.d/files.conf
  5. 2
      nginx/nginx/conf.d/jellyfin.conf
  6. 2
      nginx/nginx/conf.d/motd.conf
  7. 2
      nginx/nginx/conf.d/speed.conf
  8. 14
      nginx/nginx/conf.d/www.conf
  9. 47
      nginx/nginx/srv/http/www/lanhost.html
  10. 3
      nginx/nginx/srv/http/www/sigkill.html
  11. 4
      proxy/proxy.run
  12. 65
      proxy/v2ray/config.json

27
docker-compose.gen

@ -36,7 +36,7 @@ version: '3'
services:
smartdns:
image: "sigkill.top/smartdns"
image: "lanhost.top/smartdns"
build:
context: ./smartdns
args:
@ -53,7 +53,7 @@ services:
restart: unless-stopped
proxy:
image: "sigkill.top/proxy"
image: "lanhost.top/proxy"
build:
context: ./proxy
args:
@ -69,15 +69,15 @@ services:
- ${DNS_IP}
ports:
- ${PROXY_SOCKS_PORT}:10086
# - ${PROXY_HTTP_PORT}:10080
- 20080:20080
- 20086:20086
- ${PROXY_HTTP_PORT}:10080
# - 20080:20080
# - 20086:20086
depends_on:
- smartdns
restart: unless-stopped
samba:
image: "sigkill.top/samba"
image: "lanhost.top/samba"
build:
context: ./samba
args:
@ -106,7 +106,7 @@ services:
restart: unless-stopped
wsdd2:
image: "sigkill.top/wsdd2"
image: "lanhost.top/wsdd2"
build:
context: ./wsdd2
args:
@ -119,7 +119,7 @@ services:
restart: unless-stopped
nginx:
image: "sigkill.top/nginx"
image: "lanhost.top/nginx"
build:
context: ./nginx
args:
@ -133,6 +133,7 @@ services:
ports:
- 80:80
volumes:
- ${VOLUME_PATH}/nginx/www:/srv/http/www
- motd_data:/srv/http/motd:ro
- /srv/share/protect:/srv/http/files/protect:ro
- /srv/share/public:/srv/http/files/public:ro
@ -140,13 +141,14 @@ services:
restart: unless-stopped
jellyfin:
image: "sigkill.top/jellyfin"
image: "lanhost.top/jellyfin"
build:
context: ./jellyfin
args:
- JELLYFIN_VERSION=${ARGS_JELLYFIN_VERSION}
user: ${MEDIA_UGID}
group_add:$( \
group_add:
- "$(gid_of video)"$( \
if [ -n "${MEDIA_GID_RENDER}" ]; then
echo
echo " - \"${MEDIA_GID_RENDER}\""
@ -166,6 +168,7 @@ services:
volumes:
- ${VOLUME_PATH}/jellyfin/config:/config
- ${VOLUME_PATH}/jellyfin/cache:/cache
- ${VOLUME_PATH}/jellyfin/fonts:/fonts
- ${MEDIA_PATH}:/media
devices:$( \
if [ -c "${DEV_DRI_RENDER}" ]; then
@ -180,7 +183,7 @@ services:
restart: unless-stopped
motd:
image: "sigkill.top/motd"
image: "lanhost.top/motd"
build:
context: ./motd
args:
@ -204,7 +207,7 @@ $(for CONF in ${ARIA2_CONFS[@]}; do
SRV_UGID=$(stat -c '%u:%g' "${SRV_PATH}")
cat <<-EOF_ARIA2
$SRV_NAME:
image: "sigkill.top/aria2"
image: "lanhost.top/aria2"
build:
context: ./aria2
args:

6
jellyfin/Dockerfile

@ -1,5 +1,7 @@
ARG JELLYFIN_VERSION=latest
FROM jellyfin/jellyfin:${JELLYFIN_VERSION}
ADD NotoSansCJKsc.tar.gz /usr/local/share/fonts/
COPY jellyfin-noto/fonts/notosans/woff2/ /usr/local/share/fonts/woff2/
#ADD NotoSansCJKsc.tar.gz /fonts/
#COPY jellyfin-noto/fonts/notosans/woff2/ /fonts/
VOLUME ["/fonts"]

2
nginx/nginx/conf.d/aria2.conf

@ -1,7 +1,7 @@
server {
listen 80;
listen [::]:80;
server_name aria2.sigkill.top;
server_name aria2.lanhost.top aria2.sigkill.top;
location / {
root /srv/http/aria2;

2
nginx/nginx/conf.d/files.conf

@ -1,7 +1,7 @@
server {
listen 80;
listen [::]:80;
server_name files.sigkill.top;
server_name files.lanhost.top files.sigkill.top;
root /srv/http/files;

2
nginx/nginx/conf.d/jellyfin.conf

@ -10,7 +10,7 @@ server {
#server {
# listen 443 ssl http2;
# listen [::]:443 ssl http2;
server_name media.sigkill.top;
server_name media.lanhost.top media.sigkill.top;
## The default `client_max_body_size` is 1M, this might not be enough for some posters, etc.
client_max_body_size 20M;

2
nginx/nginx/conf.d/motd.conf

@ -1,7 +1,7 @@
server {
listen 80;
listen [::]:80;
server_name motd.sigkill.top;
server_name motd.lanhost.top motd.sigkill.top;
root /srv/http/motd;

2
nginx/nginx/conf.d/speed.conf

@ -1,7 +1,7 @@
server {
listen 80;
listen [::]:80;
server_name speed.sigkill.top;
server_name speed.lanhost.top;
root /srv/http/speed;

14
nginx/nginx/conf.d/www.conf

@ -1,3 +1,15 @@
server {
listen 80;
listen [::]:80;
server_name lanhost.top nas.lanhost.top;
root /srv/http/www;
location / {
index lanhost.html;
}
}
server {
listen 80;
listen [::]:80;
@ -6,6 +18,6 @@ server {
root /srv/http/www;
location / {
index index.html;
index sigkill.html;
}
}

47
nginx/nginx/srv/http/www/lanhost.html

@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Services @ NAS64</title>
<meta name="description" content="Web services on NAS64 server">
<link rel="stylesheet" href="style.css">
<!--
<script>
var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-7489188-1']); _gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.async = true; ga.src = 'http://www.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
</script>
-->
</head>
<body>
<div class="drop-shadow round">
<h1><a href="http://media.lanhost.top" target="_blank">Jellyfin</a></h1>
<p>Videos, musics...</p>
</div>
<div class="drop-shadow curls">
<h1><a href="http://files.lanhost.top">Files</a></h1>
<p><a href="http://files.lanhost.top/protect">Files(Protect)</a></p>
<p><a href="http://files.lanhost.top/public">Files(Public)</a></p>
<p><a href="http://files.lanhost.top/tmp">Files(Tmp)</a></p>
<p>Files on smb://NAS64 (protect/public/tmp).</p>
<p>Directories protect/public is on server's hdd.</p>
<p>Directory tmp is in server's memery(6G available).</p>
</div>
<div class="drop-shadow round rotated">
<h1>Aria2</h1>
<p><a href="http://aria2.lanhost.top/#path=ws://aria2.lanhost.top/public">Aria2(Public)</a> --&gt; <a href="http://files.lanhost.top/public/Downloads">Files(Public)</a></p>
<p><a href="http://aria2.lanhost.top/#path=ws://aria2.lanhost.top/tmp">Aria2(Tmp)</a> --&gt; <a href="http://files.lanhost.top/tmp">Files(Tmp)</a></p>
</div>
<div class="drop-shadow round">
<h1><a href="http://speed.lanhost.top">Speed</a></h1>
<p>Lan Speed Test</p>
</div>
</body>
</html>

3
nginx/nginx/srv/http/www/index.html → nginx/nginx/srv/http/www/sigkill.html

@ -25,6 +25,9 @@
<div class="drop-shadow curls">
<h1><a href="http://files.sigkill.top">Files</a></h1>
<p><a href="http://files.lanhost.top/protect">Files(Protect)</a></p>
<p><a href="http://files.lanhost.top/public">Files(Public)</a></p>
<p><a href="http://files.lanhost.top/tmp">Files(Tmp)</a></p>
<p>Files on smb://NAS64 (protect/public/tmp).</p>
<p>Directories protect/public is on server's hdd.</p>
<p>Directory tmp is in server's memery(6G available).</p>

4
proxy/proxy.run

@ -1,5 +1,5 @@
#!/bin/sh
nmp --pre_connect true --server sockv5 --endpoint "${NMP_ENDPOINT}" --host '0.0.0.0' --port 10086 --token "${NMP_TOKEN}" >/dev/null 2>&1 &
nmp --pre_connect true --server sockv5 --endpoint "${NMP_ENDPOINT}" --host '0.0.0.0' --port 10086 --token "${NMP_TOKEN}" >/dev/null &
sleep 1
exec v2ray -config /etc/v2ray/config.json >/dev/null 2>&1
exec v2ray run -c /etc/v2ray/config.json -format jsonv5 >/dev/null

65
proxy/v2ray/config.json

@ -1,66 +1,25 @@
{
"log": {
"access": "none",
"error": "none",
"loglevel": "none"
"access": {
"type": "None"
},
"routing": {
"domainStrategy": "AsIs",
"domainMatcher": "mph",
"rules": [{
"type": "field",
"domains": [
"geosite:tld-cn",
"geosite:geolocation-cn"
],
"inboundTag": "OcInHttp",
"outboundTag": "OutDirect"
}]
"error": {
"type": "Console",
"level": "Error"
}
},
"inbounds": [{
"listen": "0.0.0.0",
"port": 20080,
"protocol": "http",
"settings": {
"timeout": 60,
"allowTransparent": false
},
"tag": "OcInHttp"
}, {
"port": 10080,
"listen": "0.0.0.0",
"port": 20086,
"protocol": "socks",
"settings": {
"udp": true
},
"tag": "OcInSocks"
"tag": "nmpin"
}],
"outbounds": [{
"protocol": "vmess",
"protocol": "socks",
"settings": {
"vnext": [{
"address": "oc1.sigkill.top",
"port": 10086,
"users": [{
"id": "186bf471-0c17-4f72-a12b-137bb324342e",
"alterId": 0,
"security": "auto",
"level": 0
}]
}, {
"address": "oc2.sigkill.top",
"port": 42570,
"users": [{
"id": "2e4e0d7e-5c26-456f-9954-d6086e51456b",
"alterId": 0,
"security": "auto",
"level": 0
}]
}]
"address": "127.0.0.1",
"port": 10086
},
"tag": "OcOutVmess"
}, {
"protocol": "freedom",
"tag": "OutDirect"
"tag": "nmpout"
}]
}

Loading…
Cancel
Save