Hey, friends how to use the reverse proxy access [www.pixiv.net]?

1. My Caddy version (caddy -version):

caddy -version
unknown
I guess he should be “v1.0.3”

2. How I run Caddy:

Please provide all of the relevant information and DO NOT REDACT anything except passwords/keys. Thank you!

I run on win10 system
E:\caddy & caddy -quic

a. System environment:

OS, relevant versions, systemd? docker? etc.

win10

b. Command:

E:\caddy & caddy -quic

c. Service/unit/compose file:

paste full file contents here

d. My complete Caddyfile:

https://lm.lorzl.ml {
	gzip
	#browse
	tls ./path/ssl/lorzl.ml.pem ./path/ssl/privkey.key
	log / stdout "{combined}"
	log ./www/404/home.log {  
	rotate_size 100  # Rotate after 100 MB  
	rotate_age  180  # Keep rotated files for 180 days  
	rotate_keep 22  # Keep at most 22 log files  
		}
	proxy / https://www.pixiv.net
	}

3. The problem I’m having:

Please describe the issue thoroughly enough so that anyone can reproduce the exact behavior you’re seeing. Be as specific as possible.

I can reverse proxy “www.youku.com
But not the reverse proxy “www.pixiv.net
Visit the website prompt error:“502 Bad Gateway”

4. Error messages and/or full log output:

Please DO NOT REDACT any information except passwords/keys.

218.5.42.5 - - [11/Oct/2019:09:00:53 +0800] “GET / HTTP/2.0” 502 40
218.5.42.5 - - [11/Oct/2019:09:00:53 +0800] “GET /favicon.ico HTTP/2.0” 502 16

5. What I already tried:

6. Links to relevant resources:

uHCymd.jpg

Hi @rer, welcome!

That error means that Caddy was unable to establish a connection to that website. I was unable to reproduce the behavior on my machine, so something between your computer and theirs is preventing the connection from succeeding.

What is in your process and error logs, anything? (use the -log flag to enable the process log, and use the errors directive to enable error logging, like errors stderr)

1 Like

Thank you, I run a detailed error log process;【 caddy - log string 】
Got the following contents:

(“
2019/10/11 09:58:28 [INFO][cache:0xc0000a07d0] Started certificate maintenance routine
2019/10/11 09:58:28 [INFO] Successfully loaded TLS assets from ./path/ssl/lorzl.ml.pem and ./path/ssl/privkey.key
2019/10/11 09:58:28 [INFO] Serving https://lm.lorzl.ml
2019/10/11 09:58:29 [INFO] SIGINT: Shutting down
2019/10/11 09:58:29 [INFO][cache:0xc0000a07d0] Stopped certificate maintenance routine
”)
I am from China;
But our continent seems to intercept the [www.pixiv.net] certificate access to detect and block

Thanks for the logs! That’s what I was looking for, except…

I was hoping that you would attempt to make a request through the proxy while the server was running so we could see if any more details were emitted to the logs.

Ah. Then in that case you will need to set up the proxy outside of the blocked network…

If that is the case, I’m guessing you would see an error like connection refused/reset or DNS lookup failed. I don’t think there’s much Caddy can do for you within a network that is restricted. Fortunately, it is common to deploy Caddy in other regions which have lower latency and higher connectivity.

You might actually want to check out this plugin: https://caddyserver.com/docs/http.forwardproxy

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.