txthinking / brook

A cross-platform programmable network tool
https://brook.app
GNU General Public License v3.0
14.4k stars 2.39k forks source link

连接不上brook wssserver #1311

Closed wyw1018 closed 6 months ago

wyw1018 commented 7 months ago

一直显示 2023/12/11 13:38:57 x509: certificate signed by unknown authority 2023/12/11 13:38:58 x509: certificate signed by unknown authority ...... wssserver端的配置: wssserver --password 711018 --domainaddress xxxx.fly.dev:443 --cert=/usr/local/share/cert.pem --certkey=/usr/local/share/certkey.pem

wssclient端的配置 wssclient -p="711018" -s="wss://xxxx.fly.dev:443" --ca="C:\Users\张三.nami\bin\ca.pem" --address="[2ax9:8280:1::f:xxd3]:443" --socks5="127.0.0.1:10800" --tlsfingerprint="chrome"

txthinking-bot commented 7 months ago

这三个 pem 什么关系,reproduce steps? by unknown

txthinking commented 7 months ago

https://github.com/txthinking/brook/blob/master/docs/example-zh.md#%E8%BF%90%E8%A1%8C-brook-wssserver-%E8%87%AA%E5%B7%B1%E7%AD%BE%E5%8F%91%E9%9D%9E%E4%BF%A1%E4%BB%BB%E8%AF%81%E4%B9%A6-%E7%94%9A%E8%87%B3%E4%B8%8D%E6%98%AF%E4%BD%A0%E8%87%AA%E5%B7%B1%E7%9A%84%E5%9F%9F%E5%90%8D%E4%B9%9F%E5%8F%AF%E4%BB%A5

wyw1018 commented 7 months ago

ca.pem 是在本地电脑gitbash里用命令mad ca --ca ~/.nami/bin/ca.pem --key ~/.nami/bin/cakey.pem生成的。 cert.pem 和certkey.pem用mad cert --ca ~/.nami/bin/ca.pem --ca_key ~/.nami/bin/cakey.pem --cert ~/.nami/bin/cert.pem --key ~/.nami/bin/certkey.pem --domain xxxx.fly.dev生成的。 然后在dockerfile里面用COPY ~/.nami/bin/cert.pem /usr/local/share/ 和COPY ~/.nami/bin/certkey.pem /usr/local/share/复制到应用里面。dockefile里面还有FROM teddysun:latest EXPOSE 8080 toml文件里internal_port = 8080 services.port =80 和443 handlers分别是"http" 和 “tls, http" ca.pem也安装到了本地windows系统的受信任的根证书颁发机构 感觉和你github的教程没区别,但就是出错

txthinking commented 7 months ago

看起来你似乎是在使用fly.io容器,不知道你的配置。不过我刚才试了一下部署了个 ipv6 wss正常.

jb https://bash.ooo/fly.js

https://github.com/txthinking/bash

wyw1018 commented 7 months ago

我看了你给的网址,可是toml文件是构造wsserver而不是wssserver entrypoint = ["/brook", "wsserver", "--listen", ":8080", "--password", "${password}"] 而且根据你github说明wssserver的entrypoint里参数应该是--domainaddress 不是--listen

txthinking commented 7 months ago

是的你说的没错。但这样也可以造出来 wss,就是 ws + tls = wss,就像 ws + aws, 就像 ws + cloudflare, 就像 ws + fly (动手试一下就知道了啊)

txthinking commented 6 months ago

v20240214