Giter VIP home page Giter VIP logo

siteproxy's Introduction

SiteProxy 2.0

SiteProxy 是一个功能强大的在线代理工具,采用了最新的技术,提升了代理的稳定性和兼容性。我们致力于提供 简单、高效、安全 的代理服务,为用户提供最佳的互联网访问体验。

  • 超高速性能:采用 Hono 替代传统的Express 服务器,性能提升 4 倍,带来更流畅的使用体验。
  • 云端部署:完美支持 Cloudflare Worker 部署,快速且高效。
  • AI 智能聊天:集成 DuckDuckGo AI Chat,免费提供 GPT-3.5 和 Claude 3,让你的代理服务更加智能。
  • 高级安全保护:支持密码控制代理,只有授权用户才能访问,大幅提升安全性。
  • 零配置使用:用户无需进行任何客户端配置,只需访问代理网址即可畅游全球互联网。
  • 便捷登录:全面支持 GitHub 和 Telegram Web 登录,操作简单快捷。
  • 强力加密:采用 RSA + AES 双重加密技术,保护用户登录密码,防止中间人攻击。
  • 隐私保护:通过代理网址访问全球互联网,同时隐藏用户真实 IP,保护隐私。
  • 无缝体验:无需任何软件安装和浏览器配置,即可立即使用,提供极致便利的用户体验。
查看原理
                                                 +----> google/youtube
                             +----------------+  |
                             |                |  |
user browser +-------------->+ siteproxy      +-------> wikipedia
                             |                |  |
                             +----------------+  |
                                                 +----> chinese forums

Caution

严禁将本项目用于任何非法用途,否则后果自负

Warning

由于支持多个网站的 Login,为了减少钓鱼风险,Siteproxy 在 2.0 版本对代码进行了混淆,同时禁止了默认主页网址的修改。

展示

来自 Telegram 的网友的展示 Siteproxy 部署后,加上优选IP的速度测试: Download Speed test

部署到 Cloudflare Pages

  1. 确保域名管理
    • 确保你的域名已经在 Cloudflare 名下进行管理。
  2. 克隆仓库
    • 执行命令:git clone https://github.com/netptop/siteproxy.git
  3. 编辑配置文件
    • 使用文本编辑器打开 siteproxy/build/cf_page/_worker.js 文件。
    • 搜索并替换字符串 http://localhost:5006 为你的代理服务器域名, 必须替换为HTTPS,例如 https://your-proxy-domain.com(请使用 https)。
    • 搜索并替换字符串 user22334455 为你想设置的访问密码。如果密码为空,则表示不需要密码即可访问。保存文件。
  4. 登录 Cloudflare
    • 进入 Workers 和 Pages 部分,选择 使用直接上传创建 一个 Page,上传 siteproxy/build/cf_page 目录进行部署。
  5. 配置自定义域
    • Workers & Pages 页面,打开刚才部署的 Page。
    • 点击顶部的 自定义域,然后选择 添加自定义域,设置为你的代理域名并激活域名。
  6. 访问代理服务
    • 现在可以通过 https://your-proxy-domain.com/your-password/ 访问代理服务(确保最后的斜杠存在)。注意将域名和密码替换为你自己的。

部署到 Cloudflare Workers

  1. 确保域名管理
    • 确保你的域名已经在 Cloudflare 名下进行管理。
  2. 下载并编辑 Worker 文件
    • 下载 build/worker.js 文件:链接,并使用文本编辑器打开。
    • 搜索并替换字符串 http://localhost:5006 为你的代理服务器域名,必须替换为HTTPS,例如 https://your-worker-domain.com(请使用 https)。
    • 搜索并替换字符串 user22334455 为你想设置的访问密码。如果密码为空,则表示不需要密码即可访问。
  3. 创建 Worker
    • 登录 Cloudflare,进入 Workers 和 Pages 部分,创建一个 Worker。
    • 编辑刚才创建的 Worker,将编辑过的 worker.js 文件内容复制粘贴到 Worker 内部,保存并部署。
  4. 配置自定义域
    • Workers & Pages 页面,打开刚才保存的 Worker。
    • 点击顶部的 设置 -> 触发器,然后选择 添加自定义域,设置为你的代理域名。自定义域名设置成功后,DNS 页面应显示对应的 DNS 类型为 Worker。
  5. 访问代理服务
    • 现在可以通过 https://your-worker-domain.com/your-password/ 访问代理服务(确保最后的斜杠存在,并替换为你自己的域名和密码)。

部署到 VPS 或者云服务器

  1. 创建 SSL 网站
    • 使用 certbotnginx 创建 SSL 网站。具体用法可以 Google 搜索。
    • 配置 nginx,确保 /etc/nginx/conf.d/default.conf 文件包含以下内容:
      server {
         server_name your-proxy.domain.name; #请替换为你的实际域名
         location / {
           proxy_pass http://localhost:5006;
         }
      }
  2. 重启 nginx
    • 执行命令:sudo systemctl restart nginx
  3. 安装 Node.js v21 或更高版本
    • 执行以下命令:
      curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
      source ~/.bashrc
      nvm install v21
  4. 克隆仓库
    • 执行命令:git clone https://github.com/netptop/siteproxy.git
  5. 进入项目目录
    • 执行命令:cd siteproxy
  6. 测试运行
    • 执行命令:node bundle.js
    • 如果没有错误,按 Ctrl+C 结束程序。
  7. 配置文件修改
    • 打开并修改 config.json 文件,内容如下:
      {
         "proxy_url": "https://your-proxy.domain.name", // 替换为HTTPS加你的代理服务器域名,确保使用 https
         "token_prefix": "/user-SetYourPasswordHere/",  // 设置网站密码,用于防止非法访问,保留首尾的斜杠。为空表示不设置密码
         "local_listen_port": 5006, // 不要修改,以确保与 nginx 配置一致
         "description": "注意:token_prefix 相当于网站密码,请谨慎设置。 proxy_url 和 token_prefix 合起来就是访问网址。"
      }
  8. 安装 Forever
    • 执行命令:npm install -g forever
  9. 启动应用
    • 执行命令:forever stopall && forever start bundle.js
  10. 访问代理服务
    • 在浏览器中访问你的域名,网址为 proxy_urltoken_prefix
  11. 使用 Cloudflare 加速(可选)
    • 参考 Cloudflare 的官方说明进行设置。

现在,你的代理服务已经成功部署并可以通过浏览器访问。

Docker 部署

  1. 配置 SSL 证书和 Nginx
    • 配置域名对应的 SSL 证书和 Nginx,将其指向本地的 5006 端口。
  2. 克隆仓库
    • 执行命令:git clone https://github.com/netptop/siteproxy.git
  3. 编辑配置文件
    • 打开并修改 config.json 文件,内容如下:
      {
         "proxy_url": "https://your-proxy-domain.com", // 替换为你申请到的代理服务器域名
         "token_prefix": "/user-SetYourPasswordHere/",  // 设置网站密码,用于防止非法访问,保留首尾的斜杠
         "description": "注意:token_prefix 相当于网站密码,请谨慎设置。 proxy_url 和 token_prefix 合起来就是访问网址。"
      }
    • 保存文件。
  4. 启动 Docker 容器
    • 进入 docker-node 子目录。
    • 执行命令:sudo docker compose up
  5. 访问代理服务
    • 现在可以通过 https://your-proxy-domain.com/user-your-password/ 访问代理服务。请将域名和密码替换为你自己的域名和密码。

感谢

  • netptop.com 默认主页由 Telgram 网友 SenZyo 设计, 感谢贡献!
  • 文档由 LAGSNES 编写

联系方式

Telegram群: https://siteproxy.t.me E-mail: [email protected]

siteproxy's People

Contributors

netptop avatar senzyo avatar snesnya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

siteproxy's Issues

版本v2.1.7报错,之前v2.0.17正常

TypeError: fetch failed
    at Object.fetch (node:internal/deps/undici/undici:11731:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  cause: InvalidArgumentError: invalid connection header
      at processHeader (node:internal/deps/undici/undici:6674:17)
      at new Request (node:internal/deps/undici/undici:6502:13)
      at [http1 build request] (node:internal/deps/undici/undici:6595:16)
      at [dispatch] (node:internal/deps/undici/undici:7697:139)
      at Intercept (node:internal/deps/undici/undici:7377:20)
      at [Intercepted Dispatch] (node:internal/deps/undici/undici:6007:16)
      at Client.dispatch (node:internal/deps/undici/undici:6023:44)
      at [dispatch] (node:internal/deps/undici/undici:6254:32)
      at [Intercepted Dispatch] (node:internal/deps/undici/undici:6000:33)
      at Pool.dispatch (node:internal/deps/undici/undici:6023:44) {
    code: 'UND_ERR_INVALID_ARG'
  }
}

Node版本要求

可不可以直接写Node版本要求?习惯用apt安装了,难道自带的 10.19.0 太低了?

path traversal vulnerability

There is no path traversal chek in index.js when sending local files, so it's possible to read any file by path traversal.

poc: curl --path-as-is http://siteproxy.your.domain.name/../../../etc/passwd

image.png

Google Chrome浏览器

执行wrangler login,点击“允许”之后会显示“Error”,点击F12后发现报错
Access to () has been blocked by CORS : No ‘Access-Control-Allow-Origin’ header is present on the requested resource,这应该怎么解决呢

Self Dependent Server

I gotthe server working, but when I try to access youtube videos, it leads to siteproxy.now.sh. It wont use my own server.

代码问题,还是我信息泄露?

我在heroku部署,绑定域名并开cloudflare CDN,之前没发现异常流量,就我一个人用怎么会有异常流量?当我设置CDN防火墙后,成功阻断了这几个ip,为同一个ip段,各位看下是否为66.249.66.0/24。
Screenshot_20210811-022623_Firefox

问题

无法部署在heroku问

Twitter api blocked

推特 API 无法调用,现在网页永远显示页面不存在,几天前测试就这样了

禁止各大搜索引擎的爬虫

部署到cloudflare workers时,经常被发邮件警告10万次额度不够用,一看分析,有来自US、RU、JP等的数十万次请求,大多是搜索引擎的爬虫。建议在请求/robots.txt的时候返回相应文本,禁止爬虫的递归请求。
图片
图片

如何设置首页为某网站的代理

我想用siteproxy实现对某个站点的单独代理,同时代理外链及其它,所以能否设置打开部署后的域名就自动代理这个站点,不显示默认的起始页。
似乎代码中有类似设置,但Workers.js经过压缩我实在是找不到了(
如果Workers搞不定,能否提供其他部署方式的解决方案?

Telegram登录

1.Cloud Flare Workers 版本无法登录Telegram Web版,总是卡在generate key这一步
2.Heroku部署的话可以登录web.telegram.org 但是希望可以加上密码访问,保证安全

还有,Telegram官方出了webk.telegram.org和wekz.telegram.org,这2个版本都无法正常访问,希望可以修复一下这个Bug

siteproxy被我发现的新大陆

##缺点##
1.推特文章只支持搜索出来的,不支持自动渲染展示的,这点不好,相比jsproxy,这个能看推特

2.服务器安装上貌似有点BUG

3.YouTube样版过于简单

##优点##

siteproxy添加自定义功能兼容性很好(滑稽)

heroku

按照netptop大神的heroku部署方法,无法打开app
希望早日得到解决

配合cdn使用的问题

部署到vps后直接访问正常,套上cloudflare后可以访问首页,其它链接都显示{}

无法使用Youtube

我把它部署到了 heroku 上,但是访问youtube视频的时候会提示 Please update your browser
Screen Shot 2022-06-23 at 1 48 27 pm

DNS lookup failed

Workers调试提示错误。是不是28行有错?

Uh oh...
Error communicating with origin server dash.cloudflare.comhttps:
Details
DNS lookup failed.; params.host = dash.cloudflare.comhttps; params.service = ; gai_strerror(status) = Name or service not known
Performance & security by Cloudflare

worker.js:97 req2middleware, headers:{"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9","accept-encoding":"gzip","accept-language":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6","cf-connecting-ip":"116.25.46.210","cf-ipcountry":"CN","cf-ray":"70682082a4409870-SJC","cf-visitor":"{"scheme":"https"}","dnt":"1","host":"siteproxy.netptop.workers.dev","referer":"https://dash.cloudflare.com/","sec-ch-ua":"\" Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":""Windows"","sec-fetch-dest":"iframe","sec-fetch-mode":"navigate","sec-fetch-site":"cross-site","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36 Edg/101.0.1210.32","x-forwarded-proto":"https"}
worker.js:28 timestr:2022-05-05T08:32:41.484Z, serverName:siteproxy.netptop.workers.dev, middle_req:{"url":"https://siteproxy.netptop.workers.dev/","headers":{"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","accept-encoding":"gzip","accept-language":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6","cf-connecting-ip":"116.25.46.210","cf-ipcountry":"CN","cf-ray":"70682082a4409870-SJC","cf-visitor":"{\"scheme\":\"https\"}","dnt":"1","host":"siteproxy.netptop.workers.dev","referer":"https://dash.cloudflare.com/","sec-ch-ua":"\" Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":""Windows"","sec-fetch-dest":"iframe","sec-fetch-mode":"navigate","sec-fetch-site":"cross-site","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36 Edg/101.0.1210.32","x-forwarded-proto":"https"},"body":null,"bodyUsed":false,"method":"GET","redirect":"manual"}
worker.js:28 2022-05-05T08:32:41.484Z: after modification, middle_req.url:https://siteproxy.netptop.workers.dev/
worker.js:28 proxy called
worker.js:28 target:https://dash.cloudflare.com
worker.js:97 req2middleware, headers:{}
worker.js:28 calling onProxyReq...
worker.js:28 route:undefined, httpType:https, host:dash.cloudflare.com
worker.js:28 host=dash.cloudflare.com
worker.js:28 ====> after onProxyReq, middle_proxyReq:{"url":"https://siteproxy.netptop.workers.dev/","headers":{"accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9","accept-encoding":"gzip","accept-language":"zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6","dnt":"1","host":"dash.cloudflare.com","referer":"dash.cloudflare.com","sec-ch-ua":"\" Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":""Windows"","sec-fetch-mode":"cors","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36 Edg/101.0.1210.32","Accept-Encoding":"gzip"},"body":null,"bodyUsed":false,"method":"GET","redirect":"manual","path":"https://siteproxy.netptop.workers.dev/"}
worker.js:97 set header:accept, text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
worker.js:97 set header:accept-encoding, gzip
worker.js:97 set header:accept-language, zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
worker.js:97 set header:dnt, 1
worker.js:97 set header:host, dash.cloudflare.com
worker.js:97 set header:referer, dash.cloudflare.com
worker.js:97 set header:sec-ch-ua, " Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101"
worker.js:97 set header:sec-ch-ua-mobile, ?0
worker.js:97 set header:sec-ch-ua-platform, "Windows"
worker.js:97 set header:sec-fetch-mode, cors
worker.js:97 set header:upgrade-insecure-requests, 1
worker.js:97 set header:user-agent, Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36 Edg/101.0.1210.32
worker.js:97 set header:Accept-Encoding, gzip
worker.js:97 cf_proxyReq.header[accept]=text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9
worker.js:97 cf_proxyReq.header[accept-encoding]=gzip
worker.js:97 cf_proxyReq.header[accept-language]=zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
worker.js:97 cf_proxyReq.header[dnt]=1
worker.js:97 cf_proxyReq.header[host]=dash.cloudflare.com
worker.js:97 cf_proxyReq.header[referer]=dash.cloudflare.com
worker.js:97 cf_proxyReq.header[sec-ch-ua]=" Not A;Brand";v="99", "Chromium";v="101", "Microsoft Edge";v="101"
worker.js:97 cf_proxyReq.header[sec-ch-ua-mobile]=?0
worker.js:97 cf_proxyReq.header[sec-ch-ua-platform]="Windows"
worker.js:97 cf_proxyReq.header[sec-fetch-mode]=cors
worker.js:97 cf_proxyReq.header[upgrade-insecure-requests]=1
worker.js:97 cf_proxyReq.header[user-agent]=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.41 Safari/537.36 Edg/101.0.1210.32
worker.js:28 fetching: cf_proxyReq:{"signal":{"aborted":false},"fetcher":null,"redirect":"manual","headers":{},"url":"https://dash.cloudflare.comhttps://siteproxy.netptop.workers.dev/","method":"GET","bodyUsed":false,"body":null}
worker.js:97 config.serverName:siteproxy.netptop.workers.dev
worker.js:97 cf_res header: content-length, 1444
worker.js:97 cf_res header: content-type, text/html; charset=UTF-8
worker.js:28 calling onProxyRes...
worker.js:97 on called: data
worker.js:97 on called: end
worker.js:28 1
worker.js:28 2, setCookieHeaders:[]
worker.js:28 3
worker.js:28 4
worker.js:28 after onProxyRes, cf_proxyRes.body:{"locked":false}
worker.js:28 ====> middle_res.send() being called.
worker.js:28 sending response ...
worker.js:97 middle2res 1
worker.js:97 header key:content-type
worker.js:97 header key:set-cookie
worker.js:97 before creating Response, middle_res:{"headers":{"content-type":"text/html; charset=UTF-8","set-cookie":["ORIGINALHOST=https/dash.cloudflare.com; expires=Invalid Date; domain=siteproxy.netptop.workers.dev; path=/"]},"statusCode":502,"ok":true,"body":{"locked":false},"onDict":{},"url":"","replied":true}
worker.js:97 middle2res 2, cf_res:{"webSocket":null,"url":"","redirected":false,"ok":false,"headers":{},"statusText":"Bad Gateway","status":502,"bodyUsed":false,"body":{"locked":false}}
worker.js:28 sent cf_res:{"webSocket":null,"url":"","redirected":false,"ok":false,"headers":{},"statusText":"Bad Gateway","status":502,"bodyUsed":false,"body":{"locked":false}}
worker.js:28 on end 1, bodyList.length:1
worker.js:28 on end 2, body.length:1444
worker.js:28 ====> middle_res.send() being called.
worker.js:28 before getWriter
worker.js:28 after getWriter
worker.js:28 after write data
worker.js:28 writable closed.

Deploy on vercel.

它曾经是一个你现在无法部署的问题,但现在它已更改为 vercel,我认为这是可能的。我要你制作 vercel.json。

这个代理挺不错就是部署到heroku速度慢

访问方式简单,就是速度优点慢,而且上youtube会出现黄色警告:我们很快将停止支持此浏览器。要想获得最理想的体验,请更新您的浏览器。不知为什么为有这个。

iOS

在heroku部署的siteproxy无法在iOS上使用(包括Chrome)但在安卓和win一切正常
忘解决

recaptcha 验证码不显示

recaptcha 是动态载入的,应该很难通过前端代理吧。
虽然我不知道这个项目的登录是怎样实现的,按理说前端代理也是没法处理动态请求的。如果登录有办法实现,那么动态载入的验证码是否也能实现交互呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.