PP 网络浏览器 代码分享

320 天前
 wuruxu

分享对 chromium 浏览器的一些修改,希望对大家有帮助

项目地址 https://github.com/wuruxu/cr_proxy_pass

PP 网络浏览器

主要功能

  1. 无须使用 VPN,即可通过 nginx proxy_pass 访问 firewall 后的资源

Android 预览版下载

https://github.com/wuruxu/cr_proxy_pass/releases/download/1.0.0.b/ChromePublic.apk

1262 次点击
所在节点    程序员
18 条回复
rekulas
320 天前
不错 常用协议都支持么
wuruxu
320 天前
@rekulas 应该都支持,有问题可以提 issue
itakeman
316 天前
楼主 按照你的设置,显示 502 错误
wuruxu
316 天前
@itakeman
在浏览器中配置 ProxyPass Item 的时候,最后的 '/' 加了吗? https://mynginx.org/cr_proxy/
itakeman
316 天前
@wuruxu 加了/ 所有配置都是抄的你的,就域名换成自己的
itakeman
316 天前
@wuruxu 可能是 uid 的问题,我只是谷歌了一下 nginx 的 uid 照着自己修改的填写,不起作用,http uid 是指的哪方面的设置?
itakeman
316 天前
@wuruxu 我以为是自己没上证书的问题,现在看来 后面上了证书,还有存在这个问题,可能不是这个问题,还是 uid 的问题吧
wuruxu
316 天前
@itakeman uid 只是用来在你的 nginx 后台可以记录和查看用户访问情况
就是可以在 nignx 配置 ,$http_ppuid 这样来使用
itakeman
316 天前
@wuruxu 楼主的意思,uid 是不用自己设置的吗?
wuruxu
316 天前
@itakeman 就是你可以随意给你 PP 网络浏览器配置一个 uid , 这个只是可以在 nginx log 中看到
itakeman
316 天前
@wuruxu 如此看来就是两个问题,
1.第一次没配置证书
2.以前用两年,现在自己手撸 nginx ,刚刚试了一下反向代理自己其他服务也是提示 5xx 错误

看样子是 nginx 的配置出了问题
感谢楼主解答,我再尝试一下
wuruxu
316 天前
@itakeman 可以通过这样的命令来测试你的配置是否正确
```
curl -v -H "ppurl:https://www.google.com.sg/" https://mynginx.org/cr_proxy/
```
itakeman
315 天前
@wuruxu * Trying 198.xx.98.xx:443... * Connected to test.xxx.com (198.xx.98.xx) port 443 (#0)
* ALPN: offers h2 * ALPN: offers http/1.1

* [CONN-0-0][CF-SSL] TLSv1.0 (OUT), TLS header, Certificate Status (22): * [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS handshake, Client hello (1):
* [CONN-0-0][CF-SSL] TLSv1.2 (IN), TLS header, Certificate Status (22):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Server hello (2):
* [CONN-0-0][CF-SSL] TLSv1.2 (IN), TLS header, Finished (20): * [CONN-0-0][CF-SSL] TLSv1.2 (IN), TLS header, Supplemental data (23): * [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Certificate (11):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, CERT verify (15):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Finished (20):
* [CONN-0-0][CF-SSL] TLSv1.2 (OUT), TLS header, Finished (20):
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* [CONN-0-0][CF-SSL] TLSv1.2 (OUT), TLS header, Supplemental data (23):
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
* subject: CN:xxx.com
* start date: Dec 5 00:34:00 2023 GMT
* expire date: Mar 4 00:33:59 2024 GMT
* subjectAltName: host "test.xxx.com" matched cert's "*.xxx.com"
* issuer: C=US; O=Let's Encrypt; CN=E1
* SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* [CONN-0-0][CF-SSL] TLSv1.2 (OUT), TLS header, Supplemental data (23):
* [CONN-0-0][CF-SSL] TLSv1.2 (OUT), TLS header, Supplemental data (23):
* [CONN-0-0][CF-SSL] TLSv1.2 (OUT), TLS header, Supplemental data (23):
* h2h3 [:method: GET]
* h2h3 [:path: /cr_proxy/]
* h2h3 [:scheme: https]
* h2h3 [:authority: test.xxx.com]
* h2h3 [user-agent: curl/7.87.0]
* h2h3 [accept: */*]
* h2h3 [ppurl: https://www.google.com.sg/]
* Using Stream ID: 1 (easy handle 0xb400007ccf08d800)
* [CONN-0-0][CF-SSL] TLSv1.2 (OUT), TLS header, Supplemental data (23):
> GET /cr_proxy/ HTTP/2
> Host: test.xxx.com
> user-agent: curl/7.87.0
> accept: */*
> ppurl:https://www.google.com.sg/
>
* [CONN-0-0][CF-SSL] TLSv1.2 (IN), TLS header, Supplemental data (23):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* [CONN-0-0][CF-SSL] TLSv1.2 (IN), TLS header, Supplemental data (23):
* [CONN-0-0][CF-SSL] TLSv1.2 (OUT), TLS header, Supplemental data (23):
* [CONN-0-0][CF-SSL] TLSv1.2 (IN), TLS header, Supplemental data (23):
* [CONN-0-0][CF-SSL] TLSv1.2 (IN), TLS header, Supplemental data (23):
< HTTP/2 520
< date: Wed, 17 Jan 2024 05:07:23 GMT
< content-type: text/plain; charset=UTF-8
< content-length: 15
< report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=G2DMvdCp881gMb2QyFAe7nkNoIwY2ucqTBJ%2B2D3E4XqL1wHCNcqxsa%2BoKszS4hax%2Fi8LI6eOilB0BFGruIelg7biv%2Ft04%2BMXzeF4pZ67uba1QH616YeolvaTtTZAQ%2F89gQ%3D%3D"}],"group":"cf-nel","max_age":604800}
< nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
< strict-transport-security: max-age=2592000; includeSubDomains; preload
< x-content-type-options: nosniff
< x-frame-options: SAMEORIGIN
< referrer-policy: same-origin
< cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< expires: Thu, 01 Jan 1970 00:00:01 GMT
< server: cloudflare
< cf-ray: 846c13043b530e40-AMS
< alt-svc: h3=":443"; ma=86400
<
* [CONN-0-0][CF-SSL] TLSv1.2 (IN), TLS header, Supplemental data (23):
* [CONN-0-0][CF-SSL] TLSv1.2 (IN), TLS header, Supplemental data (23):
* Connection #0 to host test.xxx.com left intact
itakeman
315 天前
@wuruxu 貌似没看到错误提示
itakeman
315 天前
@wuruxu 抱歉,忘了改动 nginx ,我重新装载 nginx 试试
wuruxu
315 天前
应该是你的 nginx 配置有问题,我这里是可以正常工作的
itakeman
315 天前
@wuruxu 我也觉得,感谢回复,我改动试一下
itakeman
310 天前
@wuruxu 重整 nginx 配置,其他网站没有问题,唯独这个有问题,看日志就这个显示 502 错误,弄了好久,感觉无解

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1008208

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX