add upstream

This commit is contained in:
mercury
2023-06-28 10:25:01 +04:00
parent 920afd2f39
commit cb07dded78
7 changed files with 93 additions and 74 deletions
+14 -8
View File
@@ -2447,14 +2447,14 @@ DNS-over-HTTPS with IP:
'callback_data' => "/menu wg 0",
],
[
'text' => $this->i18n('sh_title'),
'callback_data' => "/menu ss",
'text' => $this->i18n('ad_title'),
'callback_data' => "/menu adguard",
],
],
[
[
'text' => $this->i18n('ad_title'),
'callback_data' => "/menu adguard",
'text' => $this->i18n('sh_title'),
'callback_data' => "/menu ss",
],
[
'text' => $this->i18n('pac'),
@@ -2462,14 +2462,20 @@ DNS-over-HTTPS with IP:
],
],
[
[
'text' => $this->i18n('mtproto'),
'callback_data' => "/mtproto",
],
[
'text' => $this->i18n('xray'),
'callback_data' => "/xray",
],
[
'text' => $this->i18n('geodb'),
'callback_data' => "/geodb",
],
],
[
[
'text' => $this->i18n('mtproto'),
'callback_data' => "/mtproto",
],
],
[
[
+4
View File
@@ -257,4 +257,8 @@ $i = [
'en' => 'XTLS-Reality',
'ru' => 'XTLS-Reality',
],
'geodb' => [
'en' => 'GeoIp/GeoSite',
'ru' => 'GeoIp/GeoSite',
],
];
+2 -30
View File
@@ -1,8 +1,6 @@
user nginx;
worker_processes auto;
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
error_log /logs/nginx_error;
pid /var/run/nginx.pid;
@@ -10,32 +8,6 @@ events {
worker_connections 1024;
}
stream {
upstream other {
server ng:8443;
}
upstream reality {
server xr:443;
}
map $ssl_preread_server_name $sni_name {
www.microsoft.com reality;
default other;
}
server {
listen 443 reuseport;
proxy_pass $sni_name;
ssl_preread on;
}
server {
listen 443 udp;
proxy_pass xr:443;
}
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
@@ -45,7 +17,7 @@ http {
server {
listen 80 default_server;
listen 8443 ssl http2 default_server;
listen 443 ssl http2 default_server;
ssl_certificate /certs/self_public;
ssl_certificate_key /certs/self_private;
@@ -93,7 +65,7 @@ http {
# server_name ;
#-domain
#-ssl
# listen 8443 ssl http2;
# listen 443 ssl http2;
# ssl_certificate /certs/cert_public;
# ssl_certificate_key /certs/cert_private;
#-ssl
+2 -30
View File
@@ -1,8 +1,6 @@
user nginx;
worker_processes auto;
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
error_log /logs/nginx_error;
pid /var/run/nginx.pid;
@@ -10,32 +8,6 @@ events {
worker_connections 1024;
}
stream {
upstream other {
server ng:8443;
}
upstream reality {
server xr:443;
}
map $ssl_preread_server_name $sni_name {
www.microsoft.com reality;
default other;
}
server {
listen 443 reuseport;
proxy_pass $sni_name;
ssl_preread on;
}
server {
listen 443 udp;
proxy_pass xr:443;
}
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
@@ -45,7 +17,7 @@ http {
server {
listen 80 default_server;
listen 8443 ssl http2 default_server;
listen 443 ssl http2 default_server;
ssl_certificate /certs/self_public;
ssl_certificate_key /certs/self_private;
@@ -93,7 +65,7 @@ http {
# server_name ;
#-domain
#-ssl
# listen 8443 ssl http2;
# listen 443 ssl http2;
# ssl_certificate /certs/cert_public;
# ssl_certificate_key /certs/cert_private;
#-ssl
+37
View File
@@ -0,0 +1,37 @@
user nginx;
worker_processes auto;
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
error_log /logs/nginx_error;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
stream {
upstream other {
server ng:443;
}
upstream reality {
server xr:443;
}
map $ssl_preread_server_name $sni_name {
www.microsoft.com reality;
default other;
}
server {
listen 443 reuseport;
proxy_pass $sni_name;
ssl_preread on;
}
server {
listen 443 udp;
proxy_pass xr:443;
}
}
+30 -6
View File
@@ -16,6 +16,35 @@ volumes:
adguard:
services:
up:
build:
context: dockerfile
dockerfile: nginx.dockerfile
volumes:
- ./config/.profile:/root/.ashrc:ro
- ./config/upstream.conf:/etc/nginx/nginx.conf
- ./scripts/start_upstream.sh:/start_upstream.sh
- ./ssh:/ssh
- ./config/sshd_config:/etc/ssh/sshd_config
- ./logs/:/logs/
ports:
- 443:443
hostname: upstream
depends_on:
php:
condition: service_healthy
ad:
condition: service_started
ss:
condition: service_started
environment:
TZ: ${TZ}
stop_grace_period: 1s
command: ["/bin/sh", "/start_upstream.sh"]
networks:
default:
ipv4_address: 10.10.0.10
logging: *default-logging
ng:
build:
context: dockerfile
@@ -31,14 +60,9 @@ services:
- ./logs/:/logs/
ports:
- 80:80
- 443:443
hostname: nginx
depends_on:
php:
condition: service_healthy
ad:
condition: service_started
ss:
up:
condition: service_started
environment:
TZ: ${TZ}
+4
View File
@@ -0,0 +1,4 @@
cat /ssh/key.pub > /root/.ssh/authorized_keys
ssh-keygen -A
exec /usr/sbin/sshd -D -e "$@" &
nginx -g "daemon off;"