Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support UDP for VLESS #549

Open
TnZzZHlp opened this issue Jun 16, 2024 · 9 comments
Open

[Feature Request] Support UDP for VLESS #549

TnZzZHlp opened this issue Jun 16, 2024 · 9 comments

Comments

@TnZzZHlp
Copy link

Greetings

No response

Feature Request

Support UDP for VLESS

Use Cases

not yet

Potential Benefits

not yet

@dae-prow
Copy link
Contributor

dae-prow bot commented Jun 16, 2024

Thanks for opening this issue!

@AkinoKaede
Copy link
Contributor

It's supported, I just tested it on my laptop and it works. If you encounter problems, please provide the configuration file.

@TnZzZHlp
Copy link
Author

TnZzZHlp commented Jun 17, 2024

It's supported, I just tested it on my laptop and it works. If you encounter problems, please provide the configuration file.

You're right, it was my issue. Enabling UDP requires adding packetEncoding=xudp to the node connection settings.

@TnZzZHlp TnZzZHlp reopened this Jun 17, 2024
@TnZzZHlp
Copy link
Author

on dae
image

same node on netch
image

@AkinoKaede
Copy link
Contributor

Please tell me the software version and configuration of the server.

@AkinoKaede
Copy link
Contributor

In addition, I'm not sure, but you could try changing the group policy to fixed.

@TnZzZHlp
Copy link
Author

Please tell me the software version and configuration of the server.

dae version v0.7.0rc1
server Debian11

I tried fixed but it didn't work.

@AkinoKaede
Copy link
Contributor

Please tell me the software version and configuration of the server.

dae version v0.7.0rc1 server Debian11

I tried fixed but it didn't work.

I mean I need the server software to test it. I tried to use V2Ray v5.16.1 and Xray v1.18.3, it's work.

@Mitsuhaxy
Copy link

Mitsuhaxy commented Jun 17, 2024

Please tell me the software version and configuration of the server.

dae version v0.7.0rc1 server Debian11
I tried fixed but it didn't work.

I mean I need the server software to test it. I tried to use V2Ray v5.16.1 and Xray v1.18.3, it's work.

服务器配置(Xray 1.8.0):

[[inbounds]]
tag = "vless-ws"
listen = "/dev/shm/websocket.socket,0666"
protocol = "vless"
[inbounds.settings]
decryption = "none"
[[inbounds.settings.clients]]
id = "mitsuha"
[inbounds.streamSettings]
network = "ws"
security = "none"
[inbounds.streamSettings.wsSettings]
path = "/websocket"
[inbounds.sniffing]
enabled = true
routeOnly = true
destOverride = ["http", "tls", "quic"]

Nginx配置:

server {
    listen 443 ssl http2;
    server_name XRAY.WEB;

    ssl_certificate /root/.ssl/xray.cer;
    ssl_certificate_key /root/.ssl/xray.key;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_early_data on;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
    ssl_ecdh_curve X25519:prime256v1:secp384r1;
    ssl_session_cache shared:SSL:50m;
    ssl_session_timeout 12h;
    ssl_buffer_size 4k;

    client_header_timeout 1h;
    keepalive_timeout 1h;

    location /websocket {
        proxy_redirect off;
        if ($http_upgrade != "websocket") {
            return 404;
        }
        proxy_set_header Early-Data $ssl_early_data;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://unix:///dev/shm/websocket.socket;
    }
}

dae配置和环境:

root@debian:~# uname -a
Linux debian 6.1.0-18-arm64 #1 SMP Debian 6.1.76-1 (2024-02-01) aarch64 GNU/Linux
root@debian:~# dae -v
dae version v0.6.0
go runtime go1.22.3 linux/arm64
Copyright (c) 2022-2024 @daeuniverse
License GNU AGPLv3 <https://github.com/daeuniverse/dae/blob/main/LICENSE>
root@debian:~# cat /etc/dae/config.dae 
global {
    tproxy_port: 12345
    tproxy_port_protect: true
    so_mark_from_dae: 0
    log_level: info
    disable_waiting_network: false
    wan_interface: auto
    auto_config_kernel_parameter: true
    tcp_check_url: 'http://cp.cloudflare.com,1.1.1.1,2606:4700:4700::1111'
    tcp_check_http_method: HEAD
    udp_check_dns: 'dns.google.com:53,8.8.8.8,2001:4860:4860::8888'
    check_interval: 30s
    check_tolerance: 50ms
    dial_mode: domain
    allow_insecure: true
    sniffing_timeout: 100ms
    tls_implementation: tls
    utls_imitate: chrome_auto
}

subscription {
}

node {
	hktc: 'vless://[email protected].*.*:443?type=ws&security=tls&&sni=XRAY.WEB&host=XRAY.WEB&path=%2Fwebsocket'
}

dns {
    upstream {
        localdns: 'udp://dns.alidns.com:53'
        remotedns: 'udp://dns.google.com:53'
    }
    routing {
        request {
            qname(geosite:geolocation-cn) -> localdns
            fallback: remotedns
        }
    }
}

group {
    proxy {
        policy: random
    }
}

routing {
    dip(geoip:private) -> direct
    dip(geoip:cn) -> direct
    domain(geosite:geolocation-cn) -> direct
    fallback: proxy
}

dae log:

Jun 16 09:12:20 debian dae[1355]: level=debug msg="Connectivity Check Failed" err=timeout network="udp6(DNS)" node=hktc
Jun 16 09:12:20 debian dae[1355]: level=debug msg="Connectivity Check Failed" err=timeout network="udp4(DNS)" node=hktc
Jun 16 09:12:40 debian dae[1355]: level=debug msg="Connectivity Check" avg_10=162ms last=130ms mov_avg=192ms network=tcp4 node=hk>
Jun 16 09:12:40 debian dae[1355]: level=debug msg="Connectivity Check" avg_10=168ms last=143ms mov_avg=200ms network="tcp4(DNS)" >
Jun 16 09:12:41 debian dae[1355]: level=debug msg="Connectivity Check Failed" err="websocket: close 1000 (normal)" network="tcp6(>
Jun 16 09:12:41 debian dae[1355]: level=debug msg="Connectivity Check Failed" err="Head "http://cp.cloudflare.com": websocket: cl>
Jun 16 09:12:50 debian dae[1355]: level=debug msg="Connectivity Check Failed" err=timeout network="udp4(DNS)" node=hktc
Jun 16 09:12:50 debian dae[1355]: level=debug msg="Connectivity Check Failed" err=timeout network="udp6(DNS)" node=hktc
Jun 16 09:13:11 debian dae[1355]: level=debug msg="Connectivity Check" avg_10=265ms last=1.163s mov_avg=678ms network=tcp4 node=h>
Jun 16 09:13:11 debian dae[1355]: level=debug msg="Connectivity Check" avg_10=270ms last=1.171s mov_avg=685ms network="tcp4(DNS)">

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants