V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  liuzimin  ›  全部回复第 1 页 / 共 85 页
回复总数  1682
1  2  3  4  5  6  7  8  9  10 ... 85  
现在 AI 这类翻译水平怎么样了?
1 天前
回复了 cjhyy 创建的主题 NAS 请教下买哪个 nas 最好
@yangzzzzzz 请问啥是实况照片?我也在用极空间,但没玩过这个功能。感觉极相册一直那个样子。
上闲鱼花钱找人帮忙解决。
@jswh #2 我也改成你这样了,但还是报一样的错。。不过很奇怪,一年前我用同一套代码部署的,一点问题都没有,今年新买了一台云服务器,部署就各种报错。
头大,现在 https 网页访问没问题了,但 tailscale 客户端用 https 的服务器地址就死活不跳转。。。
@ray1980 derp 我以前自建过。所以这里只讨论了 headscale 相关。
没整明白,这个回扣怎么吃?我也负责公司的云采购,都是我叫财务直接往公司的阿里云账号上打钱,完事我直接下单买(阿里云运营会联系给我打折改价)。。。财务打进去的钱又不能提现,折扣力度大只是少花点,余额能撑久一点而已。
@lexfoxrush 卧槽,老哥我解决了!!我放弃了 Caddy ,让 deepseek 帮我写了一个 nginx 的反代,直接一步成功,现在自签名证书走 https 稳稳的,太爽了😁。。还是老玩意儿比新东西成熟靠谱啊。

-----

在这做下笔记,给后人指个路:
- 自签名证书生成 (假设服务器 IP 以 192.168.1.1 为例):
```
openssl req -x509 -newkey rsa:4096 -sha256 -keyout private.key -out cert.crt -days 3650 -subj "/CN=192.168.1.1" -addext "subjectAltName=IP:192.168.1.1" -nodes
```

- nginx 反代配置:
```
# Headscale-UI 的反向代理( 3001 -> 3000 )
server {
listen 3001 ssl;
server_name 192.168.1.1; # 替换为你的服务器 IP 或域名

# 自签名证书路径
ssl_certificate /home/admin/docker/cert/192.168.1.1.crt;
ssl_certificate_key /home/admin/docker/cert/192.168.1.1.key;

ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;

location / {
proxy_pass http://localhost:3000; # 将请求转发到 Headscale-UI
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

# Headscale 的反向代理( 8081 -> 8080 )
server {
listen 8081 ssl;
server_name 192.168.1.1; # 替换为你的服务器 IP 或域名

# 自签名证书路径
ssl_certificate /home/admin/docker/cert/192.168.1.1.crt;
ssl_certificate_key /home/admin/docker/cert/192.168.1.1.key;

ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;

location / {
proxy_pass http://localhost:8080; # 将请求转发到 Headscale
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
```
Nginx 启动!!😁

-END-
@lexfoxrush 我用的阿里云的 Ubuntu22.04 ,和我 WSL 的版本一致。
@lexfoxrush 老哥你确定国内的云用 IP+自签名可以成功走 https 吗?
我今天又试了下,在本地电脑的 WSL 上搭了同一套,用 IP+自签名一点毛病都没有,正常启用 https 访问;但阿里云上就死活调不通😣
@lexfoxrush openssl s_client -connect <服务器 ip>:3001 -showcerts
CONNECTED(00000003)
801B3E9AD17F0000:error:0A000438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error:../ssl/record/rec_layer_s3.c:1584:SSL alert number 80
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 293 bytes
Verification: OK
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 0 (ok)
5 天前
回复了 ococnehc 创建的主题 Steam steam 下载速度受限
你的限速是我的满速😂
@lexfoxrush 老哥救命。。。。我现在也在尝试纯 IP 加自签名。
现在的情况是:
- 自签名的证书导入电脑,局域网内电脑架个纯 IP 的 Web 页面,可以成功走 https ,感觉自签名方式没问题
- headscale-ui 走 http 就能正常访问页面
- 给服务器自签名( Caddy 反代里面配置),用 https 访问 headscale-ui ,Chrome 始终报错:ERR_SSL_PROTOCOL_ERROR

(headscale 在 8080 ,headscale-ui 在 3000)

我感觉这是 Caddy 有问题?
Caddyfile:
```
{
auto_https disable_redirects
}

https://<服务器 IP>:8081 {
tls /home/admin/docker/cert/crt.crt /home/admin/docker/cert/private.key #全局签名

@cors header Origin http://<服务器 IP>:3000
@options method OPTIONS

handle @options {
header Access-Control-Allow-Origin "http://<服务器 IP>:3000"
header Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE"
header Access-Control-Allow-Headers "*"
header Access-Control-Allow-Credentials "true"
respond 204
}

handle @cors {
header Access-Control-Allow-Origin "http://<服务器 IP>:3000"
header Access-Control-Allow-Methods"POST, GET ,OPTIONS, DELETE"
header Access-Control-Allow-Headers "*"
header Access-Control-Allow-Credentials "true"
}

reverse_proxy 127.0.0.1:8080
}


https://<服务器 IP>:3001 {
tls /home/admin/docker/cert/crt.crt /home/admin/docker/cert/private.key

reverse_proxy 127.0.0.1:3000
}

```
@lexfoxrush 我用纯 IP 的方式试了下,windows 端可以正常显示一个加入链接了。。。看来确实问题出在 https 上,可能真的是域名备案问题吧。。唉,太恶心了。
@lexfoxrush 不过为啥用域名能打开 https://域名/windows 的指引页呢?而且安卓、linux 端用这个域名方式可以成功添加。
之前我也考虑过纯 IP+自签名证书方案,后来不知道哪里没搞对,把证书装上还是没走通 https ,就放弃了。
@lexfoxrush 试了下,还是一样的症状。
@yianing 我觉得全流程自建 headscale+derp 才是最终的归宿。
@yianing 但是各个客户端也不方便全都走代理呀。。。
9 天前
回复了 atao777 创建的主题 计算机 diy 主机: itx 值得选择吗?
这种很深的小机箱看起来小,但以后要是想换东西(比如换内存换 m2 固态)会很折磨。毕竟手要伸进那么挤的空间里去操作,可能为此要拆掉散热器或显卡才方便操作。。

我推荐选薄型 itx 机箱,银昕小乌鸦、米罗之类的那种。
1  2  3  4  5  6  7  8  9  10 ... 85  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3014 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 28ms · UTC 06:22 · PVG 14:22 · LAX 23:22 · JFK 02:22
Developed with CodeLauncher
♥ Do have faith in what you're doing.