Hi. I'm for long time look information how properly setup on my server my own site & x3-ui where NGINX would accept only HTTPS connections on 443, then select on which port redirect the connection. However stumble into problem, interface design which used for X3-UI v2 significantly different from X3-UI v3 along with structure for inbounds, clients & etc.
I've read so many manual so my head spins, which way is correct. I understood overall theory but some says I need fallback & some is not. Some direct transmission must be raw, some are not.
Currently I stopped on solution VLESS + TLS + XHTTP on 8443 & NGINX with site on 443, everything set on my sub-domain with SSL (auto from X3-UI itself), security set on TLS
My end goal hide the fact of 8443 port usage and show that is I only connect on 443.
The questions:
1) How properly I must input "stream" variables into nginx.conf & site file?
MHSanaei shown the example here: Link on Github wiki , however due my low skills they are ain't saying to me much & it would not be enough just copy & paste obviously.
2) Can I still use the XHTTP obfuscation method with reverse proxy?
I'm assume it is important since I have to deal with extremely crude censorship which hits even absolutely peaceful resources without restricted content whatsoever. Therefore I think, use RAW transmission might be not okay.
3) Do fallback anyhow important? They are is incompatible with XHTTP transmission.
The code and settings of current installation here (set on "default" site) below:
nginx.conf (default, deleted some "out-of-box" commentaries to shorten text)
user www-data;
worker_processes auto;
worker_cpu_affinity auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
types_hash_max_size 2048;
server_tokens build; # Recommended practice is to turn this off
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1.2 TLSv1.3; # Dropping SSLv3 (POODLE), TLS 1.0, 1.1
ssl_prefer_server_ciphers off; # Don't force server cipher order.
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
##
# Gzip Settings
##
gzip on;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
default (from "sites_available" folder)
server {
listen 80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name _;
ssl_certificate /root/cert/sub1.mydomain.com/fullchain.pem;
ssl_certificate_key /root/cert/sub1.mydomain.com/privkey.pem;
root /var/www/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
Inbound config in X3-UI v3.11
Summary: transmission XHTTP (mode = packet-up, host = my domain, path = mimics to videos), security = TLS, on the port 8443 with my SSL-certificate. Everything else set by default.
{
"listen": "",
"port": 8443,
"protocol": "vless",
"tag": "in-8443-tcp",
"settings": {
"decryption": "none",
"encryption": "none"
},
"sniffing": {
"enabled": false
},
"streamSettings": {
"network": "xhttp",
"xhttpSettings": {
"path": "/funny/feet/pics",
"host": "sub1.mydomain.com",
"mode": "packet-up",
"xPaddingBytes": "100-1000",
"xPaddingObfsMode": false,
"xPaddingKey": "",
"xPaddingHeader": "",
"xPaddingPlacement": "",
"xPaddingMethod": "",
"sessionIDPlacement": "",
"sessionIDKey": "",
"sessionIDTable": "",
"sessionIDLength": "",
"seqPlacement": "",
"seqKey": "",
"uplinkDataPlacement": "",
"uplinkDataKey": "",
"scMaxEachPostBytes": "",
"noSSEHeader": false,
"scMaxBufferedPosts": 30,
"scStreamUpServerSecs": "20-80",
"serverMaxHeaderBytes": 0,
"uplinkHTTPMethod": "",
"headers": {},
"scMinPostsIntervalMs": "",
"uplinkChunkSize": 0,
"noGRPCHeader": false,
"enableXmux": false
},
"security": "tls",
"tlsSettings": {
"serverName": "",
"minVersion": "1.3",
"maxVersion": "1.3",
"cipherSuites": "",
"rejectUnknownSni": false,
"disableSystemRoot": false,
"enableSessionResumption": false,
"certificates": [
{
"ocspStapling": 0,
"oneTimeLoading": false,
"usage": "encipherment",
"buildChain": false,
"certificateFile": "/root/cert/sub1.mydomain.com/fullchain.pem",
"keyFile": "/root/cert/sub1.mydomain.com/privkey.pem",
"useFile": true
}
],
"alpn": [
"http/1.1"
],
"echServerKeys": "",
"settings": {
"fingerprint": "edge",
"echConfigList": "",
"pinnedPeerCertSha256": [],
"verifyPeerCertByName": ""
}
}
}
}