GithubHelp home page GithubHelp logo

naiveproxy-docker's People

Contributors

raywangqvq 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

naiveproxy-docker's Issues

caddy不支持非80端口

安装的时候因为宝塔nginx占用了80,所以caddy设置其他端口,就不成功!不能用非80端口?

使用本地证书报错

如题,我用其他脚本生成了证书,再使用这个,选择了导入已有证书,在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 的文件如下:

docker
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
caddy
{
	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

我注意到你的 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 的大小也小一些

Web capture_28-3-2023_194133_hub docker com

docker-compose.yml

关于 docker-compose.yml 可以参考 caddy 官方的 Docker Compose example

建议在 docker-compose.yml 中添加 443/udp 端口,NaïveProxy 已经支持 quic 协议,我测试了比 https 速度会快一些。

Web capture_30-3-2023_121034_github com

ipv6需要配置吗?

我服务器ipv6已经配置好了,网站也可以使用ipv6访问了。
但是naive还是只支持ipv4,去一些网站监测不到ipv6

使用非默认端口,自定义证书路径ssl就会一直报错

大佬,使用非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}

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.