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

Error when compiling caddy #57

Open
houmie opened this issue Jun 6, 2023 · 14 comments
Open

Error when compiling caddy #57

houmie opened this issue Jun 6, 2023 · 14 comments

Comments

@houmie
Copy link

houmie commented Jun 6, 2023

Hello,

When I tried to compile caddy today this your plugin, it failed:

xcaddy build --with github.com/mastercactapus/caddy2-proxyprotocol --with github.com/imgk/caddy-trojan --with github.com/WeidiDeng/caddy-cloudflare-ip --with github.com/caddy-dns/cloudflare --output /usr/bin/caddy

Error:

github.com/imgk/caddy-trojan imports
	github.com/imgk/caddy-trojan/app imports
	github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile imports
	github.com/caddyserver/caddy/v2/modules/caddypki imports
	github.com/smallstep/certificates/authority imports
	github.com/smallstep/nosql imports
	github.com/smallstep/nosql/badger/v2 imports
	github.com/dgraph-io/badger/v2 imports
	github.com/dgraph-io/badger/v2/y imports
	github.com/klauspost/compress/zstd: github.com/klauspost/[email protected]: reading https://proxy.golang.org/github.com/klauspost/compress/@v/v1.15.15.zip: 403 Forbidden
2023/06/06 10:44:30 [FATAL] exit status 1

Thanks

@ArcCal
Copy link

ArcCal commented Jul 2, 2023

github.com/WeidiDeng/caddy-cloudflare-ip
请教 这个插件是干啥用的

@arenekosreal
Copy link

github.com/WeidiDeng/caddy-cloudflare-ip 请叫 这个插件是干啥用的

信任来自 cloudflare IP 的连接请求中带有的 X-Forwarded-For 头部,默认 caddy 会忽略这个
用处就是让你的应用能显示真正的来源 IP

@ArcCal
Copy link

ArcCal commented Jul 2, 2023

嗯嗯 感谢

@cattyhouse
Copy link

#54 (comment)

@lxhao61
Copy link
Contributor

lxhao61 commented Aug 3, 2023

@imgk
Caddy 正式版 2.7.2 已发布,希望大佬同步更新及修复main分支。

@imgk
Copy link
Owner

imgk commented Aug 3, 2023

@imgk
Caddy 正式版 2.7.2 已发布,希望大佬同步更新及修复main分支。

OK 了

@lxhao61
Copy link
Contributor

lxhao61 commented Aug 3, 2023

@imgk
Caddy 正式版 2.7.2 已发布,希望大佬同步更新及修复main分支。

OK 了

已测试无问题。谢谢!

@ArcCal
Copy link

ArcCal commented Aug 4, 2023

2.7.2版本编译成功但是无法运行(配置文件没有trojan相关配置)
--with github.com/imgk/caddy-trojan@master

错误信息如下:
Aug 04 16:41:26 pi caddy[22760]: Error: loading initial config: loading new config: loading trojan app module: provision trojan: unexpected end of JSON input

配置文件如下:
pi.xxxxx.com {

    reverse_proxy localhost:8080

}

@ArcCal
Copy link

ArcCal commented Aug 4, 2023

一模一样的caddyfile,在v2.6.4下一切正常(编译时带有trojan模块,但配置文件没有trojan相关配置)

@ArcCal
Copy link

ArcCal commented Aug 4, 2023

一模一样的caddyfile,在v2.7.1下也一切正常(编译时带有trojan模块,但配置文件没有trojan相关配置)

@imgk
Copy link
Owner

imgk commented Aug 5, 2023

caddy-trojan 是同一个嘛?

@ArcCal
Copy link

ArcCal commented Aug 5, 2023

caddy-trojan 是同一个嘛?

直接--with github.com/imgk/caddy-trojan@master编译出来的。没太看懂您的问题

@ArcCal
Copy link

ArcCal commented Aug 6, 2023

刚发布的caddy2.7.3症状一模一样
Aug 06 10:11:20 pi caddy[44804]: Error: loading initial config: loading new config: loading trojan app module: provision trojan: unexpected end of JSON input

@ir1ka
Copy link

ir1ka commented Aug 10, 2023

刚发布的caddy2.7.3症状一模一样 Aug 06 10:11:20 pi caddy[44804]: Error: loading initial config: loading new config: loading trojan app module: provision trojan: unexpected end of JSON input

我这儿有相同的问题,临时方案就是在不使用 trojan 的服务器上用 build arg 控制移除该行。

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

No branches or pull requests

7 participants