raywangqvq / naiveproxy-docker Goto Github PK
View Code? Open in Web Editor NEWnaiveproxy in docker
naiveproxy in docker
可以不重新安装,直接修改一下证书路径吗?
安装的时候因为宝塔nginx占用了80,所以caddy设置其他端口,就不成功!不能用非80端口?
我这手动指定了的是泛域名证书,caddy默认会不停的去申请证书,目前我是整个禁用了
{
auto_https off
}
如题,我用其他脚本生成了证书,再使用这个,选择了导入已有证书,在logs里一直显示有问题:
INFO using provided configuration {"config_file": "/data/Caddyfile", "config_adapter": ""}
Error: adapting config using caddyfile: parsing caddyfile tokens for 'tls': /data/Caddyfile:9 - Error during parsing: Wrong argument count or unexpected line ending after '/etc/v2ray-agent/tls/****.key'
Error: caddy process exited with error: exit status 1
请问是因为我改了caddy的端口吗?
docker 和 caddy 的文件如下:
version: '3.4'
services:
naive:
image: zai7lou/naiveproxy-docker
container_name: naiveproxy
tty: true
restart: unless-stopped
ports:
- 38627:38627
- 23282:23282
volumes:
- ./data:/data
- ./share:/root/.local/share
- /etc/v2ray-agent/tls/***.crt:/etc/v2ray-agent/tls/***.crt
- /etc/v2ray-agent/tls/***.key:/etc/v2ray-agent/tls/***.key
{
debug
http_port 38627
https_port 23282
auto_https disable_certs
order forward_proxy before file_server
}
:23282, ****.cf {
tls [email protected] /etc/v2ray-agent/tls/***.crt /etc/v2ray-agent/tls/***.key
route {
# proxy
forward_proxy {
basic_auth wpZ5Lb X8i8u4/m+DJCVYAAiVg=
hide_ip
hide_via
probe_resistance
}
# 伪装网址
reverse_proxy movie.douban.com {
header_up Host {upstream_hostport}
}
}
}
我注意到你的 Dockerfile 代码似乎走了一些弯路,以至于后面的 docker-compose.yml 也多了一些不必要的配置。下面是我使用的 Dockerfile
FROM golang:alpine AS build
RUN go version \
&& go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
WORKDIR /go
RUN xcaddy build --with github.com/caddyserver/forwardproxy@caddy2=github.com/klzgrad/forwardproxy@naive
# Get caddy alpine image to keep the container as small as possible
FROM caddy:alpine AS final
# Copy caddy executable from builder step
COPY --from=build /go/caddy /usr/bin/caddy
最后构建出来的 image 的大小也小一些
关于 docker-compose.yml 可以参考 caddy 官方的 Docker Compose example。
建议在 docker-compose.yml 中添加 443/udp 端口,NaïveProxy 已经支持 quic 协议,我测试了比 https 速度会快一些。
我服务器ipv6已经配置好了,网站也可以使用ipv6访问了。
但是naive还是只支持ipv4,去一些网站监测不到ipv6
我的线路实在太差,想套个cloudflare
大佬,使用非80和443端口,ssl自定义路径,就会ssl一直报错,改为80端口服务器就没有报错了,但是客户端还是提示ssl错误
2023/08/16 03:06:49.258 ERROR http.acme_client validating authorization {"identifier": "自定义域名", "problem": {"type": "", "title": "", "detail": "", "instance": "", "subproblems": []}, "order": "https://acme.zerossl.com/v2/DV90/order/zFwGHDKLk2Fa4rgmNbUIZA", "attempt": 1, "max_attempts": 3}
2023/08/16 03:06:49.258 ERROR tls.obtain could not get certificate from issuer {"identifier": "自定义域名", "issuer": "acme.zerossl.com-v2-DV90", "error": "HTTP 0 - "}
2023/08/16 03:06:49.258 ERROR tls.obtain will retry {"error": "[自定义域名] Obtain: [自定义域名] solving challenge: 自定义域名: [自定义域名] authorization failed: HTTP 0 - (ca=https://acme.zerossl.com/v2/DV90)", "attempt": 2, "retrying_in": 120, "elapsed": 97.408893926, "max_duration": 2592000}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.