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

Shadowsocks+V2ray plugin+Apache2 #281

Open
gjf opened this issue Mar 25, 2022 · 0 comments
Open

Shadowsocks+V2ray plugin+Apache2 #281

gjf opened this issue Mar 25, 2022 · 0 comments

Comments

@gjf
Copy link

gjf commented Mar 25, 2022

I have a VPS with running Apache2 server. It is used as WebDav server only (with /webdav key). Https is working with Letsencrypt keys those updated using certbot task.

I want to add Shadowsocks/V2Ray in the following way:

  • WebDav continues to work in the same way
  • When one tries to browse my server - he will see Google page
  • Shadowsocks/V2Ray works on /v2qq key

This is my Apache2 config file added to make it possible:

<IfModule mod_ssl.c>
#        RewriteEngine On
#        RewriteCond %{HTTP:Upgrade} websocket [NC]
#	RewriteCond %{HTTP:Connection} upgrade [NC]
#        RewriteRule ^/?(.*) "ws://127.0.0.1:8008/$1" [P,L]
	#RewriteCond %{HTTP:Upgrade} !=websocket [NC]
	#RewriteRule /(.*) http://localhost:8008 [P,L]
        SSLProxyEngine On
	ProxyRequests Off
#	ProxyPreserveHost On
	ProxyAddHeaders Off
	ProxyErrorOverride On
	SSLProxyVerify None
	SSLProxyCheckPeerCN Off
	SSLProxyCheckPeerName Off
	SSLProxyCheckPeerExpire Off
	Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
	Header always set Content-Security-Policy "default-src https: data: 'unsafe-inline' 'unsafe-eval'"
	Header always set X-Robots-Tag "noindex, nofollow"
	Header always set X-Content-Type-Options "nosniff"
	Header always set X-Xss-Protection "1; mode=block"
	    ProxyPass "/webdav" !
	    ProxyPass "/v2qq" "http://127.0.0.1:8008/"
	    ProxyPassReverse "/v2qq" "http://127.0.0.1:8008/"
	    ProxyPass "/" "https://www.google.com/"
</IfModule>

And this is Shadowsocks config:

{
"server": ["::1", "127.0.0.1"],
"server_port": 8008,
"password": "********",
"timeout": 300,
"method": "xchacha20-ietf-poly1305",
"no_delay": true,
"fast_open": true,
"reuse_port": true,
"workers": 1,
"plugin": "v2ray-plugin",
"nameserver": "1.1.1.1",
"plugin_opts": "server;loglevel=none",
"mode": "tcp_only"
}

Of course v2ray plugin was installed in /usr/local/bin correctly.

According to logs all process started without errors, "Google" and WebDav work both - but Shadowsocks+V2Ray doesn't.

Any idea why?

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

1 participant