Giter Club home page Giter Club logo

xray-docs-next's Introduction

xray-docs-next's People

Contributors

4piu avatar akinokaede avatar aoleou avatar bado1a5a90 avatar bionicosmos avatar chika0801 avatar chise0713 avatar chueikan avatar cube-j avatar dependabot[bot] avatar eggwite avatar esaulenka avatar fangliding avatar flowerinsnowdh avatar hmol233 avatar kobearthurscofield avatar koriiku avatar picklefan avatar poneyclairdelune avatar qianbinbin avatar r3pl4c3r avatar rootmelo92118 avatar rywng avatar se7enmuting avatar sqlimit avatar twdragon avatar xiagw avatar xqzr avatar yuhan6665 avatar zswdcx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xray-docs-next's Issues

【意见建议】针对文档开发指南模块

能否在文档 开发指南模块更加详细写一下项目的组织结构以及各个模块之间的关联关系,以及如何构建二次开发?尽管有一定的开发经验,也能写一些crud的golang代码,但想在项目核心功能不变的基础上在应用层进行一些二次开发依然觉得无从下手。也不知道是我太笨还是很多人也有同样的感受。我看代码维护多是几位核心大佬再搞,外围开发者感觉比较难于融入进来。

根据小小白白话文配置完成,但依旧无法上外网

在客户端篇,根据8.3在 PC 端手工配置 xray-core完成。

最后运行时,终端窗口显示如下:
Xray 1.7.3 (Xray, Penetrates Everything.) Custom (go1.20 windows/amd64)
A unified platform for anti-censorship.
2023/02/05 23:28:29 [Info] infra/conf/serial: Reading config: D:\my\study\self-study\xray\Xray-windows-64\config.json

纯小白,找不到办法解决,请问有大佬可以教教我如何解决吗?谢谢!

关于TProxy透明代理的一点小小建议

  1. nftables可以透明代理IPv6,转发TCP和UDP的规则可以合并成一条语句。

/etc/nftables.conf文件:(我没有让xray接管DNS解析)

#!/usr/sbin/nft -f

flush ruleset

table inet filter {
    chain input {
        ...
    }

    chain forward {
        ...
    }
    
    chain output {
        type route hook output priority filter; policy accept;
        ip daddr { 0.0.0.0/8, 10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 224.0.0.0-255.255.255.255 } return
        ip6 daddr { ::1, fc00::/7, fe80::/10, ff00::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff } return
        meta l4proto {tcp, udp} mark set 0x00000001 accept
    }

    chain prerouting {
        type filter hook prerouting priority filter; policy accept;
        ip daddr { 0.0.0.0/8, 10.0.0.0/8, 127.0.0.0/8, 100.64.0.0/16, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 224.0.0.0-255.255.255.255 } return
        ip6 daddr { ::1, fc00::/7, fe80::/10, ff00::-ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff } return
        udp dport 53 return
        meta mark 0x000000ff return
	iifname != ppp0 goto transparentProxy #不处理来自外网接口的流量
    }
    chain transparentProxy {
        meta l4proto { tcp, udp } meta mark set 0x00000001 tproxy ip to 127.0.0.1:30001 accept #xray监听端口30001
        meta l4proto { tcp, udp } meta mark set 0x00000001 tproxy ip6 to [::1]:30001 accept
    }
    
}
  1. 开机设置透明代理的路由表时应单独设置,写在/lib/systemd/system/nftables.service的规则会在nftables更新时丢失,透明代理IPv6时也需要设置路由表。
[Unit]
Description=Set Tproxy rule
After=network.target
Wants=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/sbin/ip rule add fwmark 1 table 100 ; /sbin/ip route add local 0.0.0.0/0 dev lo table 100 ; /sbin/ip -6 rule add fwmark 1 table 100 ; /sbin/ip -6 route add local ::/0 dev lo table 100
ExecStop=/sbin/ip rule del fwmark 1 table 100 ; /sbin/ip route del local 0.0.0.0/0 dev lo table 100 ; /sbin/ip -6 rule del fwmark 1 table 100 ; /sbin/ip -6 route del local ::/0 dev lo table 100

[Install]
WantedBy=multi-user.target

可以讲上述内容保存在/etc/systemd/system/tproxyrules.service中, 再执行sudo systemctl enable --now tproxyrules.service 即可
本机环境
Debian GNU/Linux 11 (bullseye) on nanopi-r4s 5.10.35-rockchip64
nftables v0.9.8 (E.D.S.)

【第 5 章】网站建设篇的问题

创建一个简单网页后,重启nginx,在chrome浏览器无法访问,看了5.4常见错误也没有解决,最后在IE浏览器终于能正常打开网页,但是在chrome浏览器无法正常显示,打开调试窗口出现VM629:6747 crbug/1173575, non-JS module files deprecated.错误,暂时不知道什么原因

ipv6透明代理是否能通告透明网关自身为默认服务器

https://github.com/XTLS/Xray-docs-next/blob/main/docs/document/level-2/tproxy_ipv4_and_ipv6.md
感谢这篇doc引入的透明网关方案。

实际使用中同时满足下列条件的时候似乎只能在主路由全局关闭ipv6:1、几乎没有主路由器能够指定透明代理设备为ipv6的默认服务器(网关),2、在需要代理的客户端无法手动关闭ipv6或者手动设置ipv6服务器(网关)(如当前版本的ios)3、需要访问ipv6优先的网站如奈飞

参考openwrt旁路由的设置,有没有可能将主路由的ra服务器设置为中继模式后,在透明网关开启ra服务通告自身为默认服务器

求助!求助!弄了快一天了!按照7.4配置完服务器,客户端连不上。

Xray服务是运行的

 systemctl status xray
● xray.service - Xray Service
   Loaded: loaded (/etc/systemd/system/xray.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/xray.service.d
           └─10-donot_touch_single_conf.conf
   Active: active (running) since Fri 2024-03-01 13:57:49 UTC; 13h ago
     Docs: https://github.com/xtls
 Main PID: 528 (xray)
    Tasks: 8 (limit: 2376)
   Memory: 18.7M
   CGroup: /system.slice/xray.service
           └─528 /usr/local/bin/xray run -config /usr/local/etc/xray/config.json

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

服务器端的配置,只改了id和日志、证书的路径

// REFERENCE:
// https://github.com/XTLS/Xray-examples
// https://xtls.github.io/config/
// 常用的 config 文件,不论服务器端还是客户端,都有 5 个部分。外加小小白解读:
// ┌─ 1*log 日志设置 - 日志写什么,写哪里(出错时有据可查)
// ├─ 2_dns DNS-设置 - DNS 怎么查(防 DNS 污染、防偷窥、避免国内外站匹配到国外服务器等)
// ├─ 3_routing 分流设置 - 流量怎么分类处理(是否过滤广告、是否国内外分流)
// ├─ 4_inbounds 入站设置 - 什么流量可以流入 Xray
// └─ 5_outbounds 出站设置 - 流出 Xray 的流量往哪里去
{
  // 1\_日志设置
  "log": {
    "loglevel": "warning", // 内容从少到多: "none", "error", "warning", "info", "debug"
    "access": "/home/vpsadmin/xray_log/access.log", // 访问记录
    "error": "/home/vpsadmin/xray_log/error.log" // 错误记录
  },
  // 2_DNS 设置
  "dns": {
    "servers": [
      "https+local://1.1.1.1/dns-query", // 首选 1.1.1.1 的 DoH 查询,牺牲速度但可防止 ISP 偷窥
      "localhost"
    ]
  },
  // 3*分流设置
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      // 3.1 防止服务器本地流转问题:如内网被攻击或滥用、错误的本地回环等
      {
        "type": "field",
        "ip": [
          "geoip:private" // 分流条件:geoip 文件内,名为"private"的规则(本地)
        ],
        "outboundTag": "block" // 分流策略:交给出站"block"处理(黑洞屏蔽)
      },
      {
        // 3.2 防止服务器直连国内
        "type": "field",
        "ip": ["geoip:cn"],
        "outboundTag": "block"
      },
      // 3.3 屏蔽广告
      {
        "type": "field",
        "domain": [
          "geosite:category-ads-all" // 分流条件:geosite 文件内,名为"category-ads-all"的规则(各种广告域名)
        ],
        "outboundTag": "block" // 分流策略:交给出站"block"处理(黑洞屏蔽)
      }
    ]
  },
  // 4*入站设置
  // 4.1 这里只写了一个最简单的 vless+xtls 的入站,因为这是 Xray 最强大的模式。如有其他需要,请根据模版自行添加。
  "inbounds": [
    {
      "port": 443,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "id": "", // 填写你的 UUID
            "flow": "xtls-rprx-vision",
            "level": 0,
            "email": "[email protected]"
          }
        ],
        "decryption": "none",
        "fallbacks": [
          {
            "dest": 80 // 默认回落到防探测的代理
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "tls",
        "tlsSettings": {
          "alpn": "http/1.1",
          "certificates": [
            {
              "certificateFile": "/home/vpsadmin/xray_cert/xray.crt",
              "keyFile": "/home/vpsadmin/xray_cert/xray.key"
            }
          ]
        }
      }
    }
  ],
  // 5*出站设置
  "outbounds": [
    // 5.1 第一个出站是默认规则,freedom 就是对外直连(vps 已经是外网,所以直连)
    {
      "tag": "direct",
      "protocol": "freedom"
    },
    // 5.2 屏蔽规则,blackhole 协议就是把流量导入到黑洞里(屏蔽)
    {
      "tag": "block",
      "protocol": "blackhole"
    }
  ]
}

nginx 的配置

 cat /etc/nginx/conf.d/default.conf
      server {
                listen 80;
                server_name zq0628.immunoassa.eu.org;
                root /var/www/webpage;
                index index.html;
}

客户端配置
弄了快一天了,也没找到什么原因

貌似反代配置中的bridge和portal写反了

https://github.com/XTLS/Xray-docs-next/blob/main/docs/config/reverse.md

假设在主机 A 中有一个网页服务器,这台主机没有公网 IP,无法在公网上直接访问。另有一台主机 B,它可以由公网访问。现在我们需要把 B 作为入口,把流量从 B 转发到 A。
在主机 A 中配置 Xray,称为bridge,在 B 中也配置 Xray,称为 portal。
bridge 会向 portal 主动建立连接,此连接的目标地址可以自行设定。portal 会收到两种连接,一是由 bridge 发来的连接,二是公网用户发来的连接。portal 会自动将两类连接合并。于是 bridge 就可以收到公网流量了。
bridge 在收到公网流量之后,会将其原封不动地发给主机 A 中的网页服务器。当然,这一步需要路由的协作。

如题,内网的服务器应该是portal,而公网服务器是bridge,所以在portal的配置中有bridge字段(需要指定对应的brdige),在bridge当中要指定对应的portal,按照逻辑也是bridge合并转发流量,portal则是出口端,负责最后的出口访问。

Selected apps TProxy-fication

Currently, the documentation provides as many as three tutorials (1,2,3) on how to set up a TProxy using IPTables, but all of them assume redirecting all system traffic, which is redundant for cases where only one app needs to be proxied, in particular some VPN client on Android. The latter is a fairly demanded task among users, but not among developers for some reason. Would it be possible to request an additional tutorial on how to redirect only selected apps to TProxy via IPTables? I think it would be in demand.

建议在连接起VPS后设置防火墙放行需要的端口或者关闭防火墙,这样才好进行后续的操作。

我是用的vultr的vps,跟着教程搭建时,在第4章更改端口后不能使用新设置的端口连接vps,经过请教大佬,后面发现把vps防火墙关闭后就可以用新端口连接起vps了。我再次新开vps根据教程改端口时一样遇到这个问题,经过设置防火墙允许放行设置的端口后就解决了这个问题。希望对遇到同样问题的朋友有帮助。

如何自行构建文档

首先,向XProject的各位表达最真诚的感谢,是你们带我走出了茫茫无边的黑暗!

其次,想请问如何从本仓库的源码构建出html格式的文档,github.io的各种你懂的问题导致我对XProject的在线文档将来是否能正常访问表示担忧,希望能构建一套本机的过构建局域网内的文档站点,也愿意力所能及的条件下作为传递火炬的人在必要的时候搭建一套备用站点

然后,如果并非用于特殊的那种需求,而是单纯在非互联网的局域网内部使用,是否与小小白白话文的区别只是使用自签名证书代替Let's Encrypt签发的证书?

最后,再次感谢!

Lack of information about PacketEncoding setting

There is no information regarding PacketEncoding setting in documents.
As it is required to set it to xudp for proper Full Con NAT function please at least add some minor information about it in the documents.

白话文7.3 crontab执行sudo命令?

小小白白话文 7.3

自动更新证书的xray-cert-renew.sh文件中
对服务重启的命令为sudo systemctl restart xray
但下方的自动任务操作crontab -e是对非root的当前用户
crontab难道可以执行sudo命令且无需输入密码么

是否应该先sudo su切换为root用户
crontab -e编辑自动任务
或者使用sudo crontab -u root -e
xray-cert-renew.sh的重启命令修改为systemctl restart xray

如果我说错了请关闭issue

小小白白话文中7.4节配置与配置指南矛盾

配置指南中描述disableSystemRoot默认为false,并且“当值为 true 时,Xray 只会使用 certificates 中指定的证书进行 TLS 握手。当值为 false 时,Xray 只会使用操作系统自带的 CA 证书进行 TLS 握手。”
而小小白白话文中7.4节配置未指定disableSystemRoot,因此certificates中的配置就不会被使用,而且7.3节整节都在描述这个不会被使用的证书。

增加nftables_gid 配置

增加nftables_gid

透明代理通过 gid 规避 Xray 流量 (iptables_gid.html) 文档中:
没有nftables 的 规则, 我自己折腾了一个 nftables_gid 的规则, 我用了一段时间了,挺好用,大佬们可以把nftables.conf 加到文档中

/etc/nftables.conf

#!/usr/sbin/nft -f
flush ruleset


define RESERVED_IP = {
10.0.0.0/8,
192.0.0.0/8,
100.64.0.0/10,
127.0.0.0/8,
169.254.0.0/16,
172.16.0.0/12,
224.0.0.0/4,
240.0.0.0/4,
255.255.255.255/32
}


table ip xray {
chain prerouting {
type filter hook prerouting priority mangle; policy accept;
ip daddr $RESERVED_IP return
ip protocol tcp tproxy to 127.0.0.1:12345 meta mark set 1
ip protocol udp tproxy to 127.0.0.1:12345 meta mark set 1

}
chain output {
type route hook output priority mangle; policy accept;
ip daddr $RESERVED_IP return
meta skgid 23333 return
ip protocol tcp meta mark set 1 
ip protocol udp meta mark set 1

}
}

xray.service

[Unit]
Description=Xray Service
Requires=NetworkManager.service
After=NetworkManager.service

[Service]
Environment="XRAY_LOCATION_ASSET=/usr/local/xray/"
User=xray_tproxy
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/local/xray/xray run -confdir /etc/xray/config_dir/
Restart=on-abort
LimitNPROC=500
LimitNOFILE=1000000

[Install]
WantedBy=multi-user.target

nftables.service

[Unit]
Description=nftables
Documentation=man:nft(8) http://wiki.nftables.org
Wants=network-pre.target
Before=network-pre.target shutdown.target
Conflicts=shutdown.target
DefaultDependencies=no
[Service]
Type=oneshot
RemainAfterExit=yes
StandardInput=null
ProtectSystem=full
ProtectHome=true
ExecStart=/usr/sbin/nft -f /etc/nftables.conf ; /usr/sbin/ip route add local default dev lo table 100 ; /usr/sbin/ip rule add fwmark 1 table 100
ExecReload=/usr/sbin/nft -f /etc/nftables.conf
ExecStop=/usr/sbin/nft flush ruleset ; /usr/sbin/ip route del local default dev lo table 100 ; /usr/sbin/ip rule del table 100


[Install]
WantedBy=sysinit.target

[Feature] 深色模式与切换

https://github.com/vuepress/awesome-vuepress 一些vuepress的资源集合,省的到处找主题和插件
https://github.com/Microflash/vuepress-theme-succinct 黑白两开花主题(强烈推荐用这个,白色晚上太刺眼了,这个主题有一个切换功能,点一下即可切成黑暗模式)

隔壁的Qv2ray的文档也是以这个主题为基础自己改了点东西,可以直接抄
https://github.com/Qv2ray/qv2ray.github.io/blob/source/package.json
https://github.com/Qv2ray/qv2ray.github.io/blob/source/patches/vuepress-theme-succinct%2B1.7.2.patch

关于grpc'断流'问题

节点使用x-ui搭建vmess+grpc的方式,tls由nginx反代grpc做前置。
'断流'的具体表现为,手机连接wifi,使用v2rayng(clash),此时节点正常使用。手机关闭wifi,使用流量,也可以正常使用。再打开wifi,连接上原wifi,此时就无法上网了,客户端无流量进出,此时需要手动关闭一下客户端的连接,再打开,就又可以了。也就是再不断开v2rayng(clash)的时候,本地网络切换重连,都会造成节点无法使用,需要手动在客户端进行重新连接。
此外,还有偶尔出现的设备一段时间没使用后,也断了,同样需要手动重新连接。
以下是nginx的配置,望大佬不吝赐教。

user www-data;
worker_processes auto;

error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    log_format main '[$time_local] $proxy_protocol_addr "$http_referer" "$http_user_agent"';
    access_log /var/log/nginx/access.log main;

    server {
        listen 443 ssl http2 so_keepalive=on;
        server_name example.com;

        index index.html;
        root /var/www/html;

        ssl_certificate /root/.cert/server.crt;
        ssl_certificate_key /root/.cert/server.key;
        ssl_protocols TLSv1.2 TLSv1.3;
        ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
        
        client_header_timeout 52w;
            keepalive_timeout 52w;

        location /xxxxxx {
            if ($content_type !~ "application/grpc") {
                return 404;
            }
            grpc_pass grpc://127.0.0.1:19988;
            client_max_body_size 0;
            client_body_buffer_size 512k;
            grpc_set_header X-Real-IP $remote_addr;
            client_body_timeout 52w;
            grpc_read_timeout 52w;
        }
    }
}

求助!求助!弄了快一天了!按照7.4配置完服务器,客户端连不上。

Xray服务是运行的

 systemctl status xray
● xray.service - Xray Service
   Loaded: loaded (/etc/systemd/system/xray.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/xray.service.d
           └─10-donot_touch_single_conf.conf
   Active: active (running) since Fri 2024-03-01 13:57:49 UTC; 13h ago
     Docs: https://github.com/xtls
 Main PID: 528 (xray)
    Tasks: 8 (limit: 2376)
   Memory: 18.7M
   CGroup: /system.slice/xray.service
           └─528 /usr/local/bin/xray run -config /usr/local/etc/xray/config.json

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.

服务器端的配置,只改了id和日志、证书的路径

// REFERENCE:
// https://github.com/XTLS/Xray-examples
// https://xtls.github.io/config/
// 常用的 config 文件,不论服务器端还是客户端,都有 5 个部分。外加小小白解读:
// ┌─ 1*log 日志设置 - 日志写什么,写哪里(出错时有据可查)
// ├─ 2_dns DNS-设置 - DNS 怎么查(防 DNS 污染、防偷窥、避免国内外站匹配到国外服务器等)
// ├─ 3_routing 分流设置 - 流量怎么分类处理(是否过滤广告、是否国内外分流)
// ├─ 4_inbounds 入站设置 - 什么流量可以流入 Xray
// └─ 5_outbounds 出站设置 - 流出 Xray 的流量往哪里去
{
  // 1\_日志设置
  "log": {
    "loglevel": "warning", // 内容从少到多: "none", "error", "warning", "info", "debug"
    "access": "/home/vpsadmin/xray_log/access.log", // 访问记录
    "error": "/home/vpsadmin/xray_log/error.log" // 错误记录
  },
  // 2_DNS 设置
  "dns": {
    "servers": [
      "https+local://1.1.1.1/dns-query", // 首选 1.1.1.1 的 DoH 查询,牺牲速度但可防止 ISP 偷窥
      "localhost"
    ]
  },
  // 3*分流设置
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      // 3.1 防止服务器本地流转问题:如内网被攻击或滥用、错误的本地回环等
      {
        "type": "field",
        "ip": [
          "geoip:private" // 分流条件:geoip 文件内,名为"private"的规则(本地)
        ],
        "outboundTag": "block" // 分流策略:交给出站"block"处理(黑洞屏蔽)
      },
      {
        // 3.2 防止服务器直连国内
        "type": "field",
        "ip": ["geoip:cn"],
        "outboundTag": "block"
      },
      // 3.3 屏蔽广告
      {
        "type": "field",
        "domain": [
          "geosite:category-ads-all" // 分流条件:geosite 文件内,名为"category-ads-all"的规则(各种广告域名)
        ],
        "outboundTag": "block" // 分流策略:交给出站"block"处理(黑洞屏蔽)
      }
    ]
  },
  // 4*入站设置
  // 4.1 这里只写了一个最简单的 vless+xtls 的入站,因为这是 Xray 最强大的模式。如有其他需要,请根据模版自行添加。
  "inbounds": [
    {
      "port": 443,
      "protocol": "vless",
      "settings": {
        "clients": [
          {
            "id": "", // 填写你的 UUID
            "flow": "xtls-rprx-vision",
            "level": 0,
            "email": "[email protected]"
          }
        ],
        "decryption": "none",
        "fallbacks": [
          {
            "dest": 80 // 默认回落到防探测的代理
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "tls",
        "tlsSettings": {
          "alpn": "http/1.1",
          "certificates": [
            {
              "certificateFile": "/home/vpsadmin/xray_cert/xray.crt",
              "keyFile": "/home/vpsadmin/xray_cert/xray.key"
            }
          ]
        }
      }
    }
  ],
  // 5*出站设置
  "outbounds": [
    // 5.1 第一个出站是默认规则,freedom 就是对外直连(vps 已经是外网,所以直连)
    {
      "tag": "direct",
      "protocol": "freedom"
    },
    // 5.2 屏蔽规则,blackhole 协议就是把流量导入到黑洞里(屏蔽)
    {
      "tag": "block",
      "protocol": "blackhole"
    }
  ]
}

nginx 的配置

 cat /etc/nginx/conf.d/default.conf
      server {
                listen 80;
                server_name zq0628.immunoassa.eu.org;
                root /var/www/webpage;
                index index.html;
}

客户端配置
弄了快一天了,也没找到什么原因

关于透明代理中的ipv6 Netfilter设置

在透明代理的ipv6 Netfilter 设置部分需要输入网关IPv6地址段参数,但由于目前ipv6的地址段都是动态分配,写入的规则在变更后会失效,是否有无需填写地址段的设置方法?

小小白白话文7.4 配置 Xray示例配置有误

尝试使用示例配置文件运行时发现如下报错:

2023/02/02 05:47:53 [Warning] [3162575646] app/proxyman/inbound: connection ends > proxy/vless/inbound: failed to use xtls-rprx-direct, maybe "security" is not "xtls"

将配置文件中inbounds部分的streamSettings修改为以下配置之后,服务正常运行:

"streamSettings": {
    "network": "tcp",
    "security": "xtls",
    "xtlsSettings": {...}
  }

其中security字段改为xtls,tlsSettings改为xtlsSettings
请检查是否确为错误,如果是麻烦修改🙂

5.4补充 (Nginx出现403的解决方案)

如果按照教程走(没有写错路径),却在加载页面时出现403,则修改
/etc/nginx/nginx.conf中的user www-data;那一行为user <你在教程第3章创建的拥有sudo权限的用户名>;(不含括号)

简单来说这个配置文件这一行告诉Nginx以www-data身份运行Nginx并访问配置文件中的文件夹,这个身份很可能没有权限访问导致无法加载资源,因此要换成有权限的身份

花了2个小时在这上面....

参考来源

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.