caddy-trojan icon indicating copy to clipboard operation
caddy-trojan copied to clipboard

Error when compiling caddy

Open houmie opened this issue 2 years ago • 14 comments

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

houmie avatar Jun 06 '23 10:06 houmie

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

ArcCal avatar Jul 02 '23 03:07 ArcCal

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

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

arenekosreal avatar Jul 02 '23 03:07 arenekosreal

嗯嗯 感谢

ArcCal avatar Jul 02 '23 05:07 ArcCal

https://github.com/imgk/caddy-trojan/issues/54#issuecomment-1506269271

cattyhouse avatar Jul 02 '23 05:07 cattyhouse

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

lxhao61 avatar Aug 03 '23 01:08 lxhao61

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

OK 了

imgk avatar Aug 03 '23 13:08 imgk

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

OK 了

已测试无问题。谢谢!

lxhao61 avatar Aug 03 '23 15:08 lxhao61

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 avatar Aug 04 '23 08:08 ArcCal

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

ArcCal avatar Aug 04 '23 08:08 ArcCal

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

ArcCal avatar Aug 04 '23 08:08 ArcCal

caddy-trojan 是同一个嘛?

imgk avatar Aug 05 '23 00:08 imgk

caddy-trojan 是同一个嘛?

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

ArcCal avatar Aug 05 '23 01:08 ArcCal

刚发布的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

ArcCal avatar Aug 06 '23 02:08 ArcCal

刚发布的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 控制移除该行。

ir1ka avatar Aug 10 '23 06:08 ir1ka