GithubHelp home page GithubHelp logo

cdlaimin / github-proxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xiaoxinda/github-proxy

0.0 1.0 0.0 433 KB

License: MIT License

PHP 48.92% Batchfile 0.47% CSS 23.84% HTML 8.94% JavaScript 17.83%

github-proxy's Introduction

(注:本程序为简单实现,因纯属业余时间编写,开发比较仓促,欢迎完善)
请遵循法律法规,不要用来做违法的事情
1.staticweb目录您需要进行nginx配置为站点。
2.GatewayWorker下start_gateway中配置wss所需要的证书
$context = array(
     'ssl' => array(// 请使用绝对路径
         'local_cert' =>'/xxxxx.pem', //也可以是crt文件
         'local_pk' => 'xxxxxx.key',
         'verify_peer' => false, // 'allow_self_signed' => true, //如果是自签名证书需要开启此选项
     )
);
3.启动GatewayWorker
cd 您的GatewayWorker路径/GatewayWorker ; php start.php start 4.start_sync中可根据您的服务器配置来设置:进程数
task进程数可以根据需要多开一些,默认为10
$task_worker->count = 10;
5.demo站点:点我跳转
6.本程序基于workerMan编写
7.因本人平常工作繁忙,欢迎爱好者帮忙搭建docker,请联系本人放出仓库地址
8.如有问题,可联系本人qq:9496898
9.另外,部署到香港、韩国、日本等非大陆的服务器的事情就不用我说了吧。推荐使用:www.vultr.com日本服务器
10.如果您也搭建了此服务,我们可以互粉一下友情链接,组合成一个阵营,互粉群:G.widora.cn 互粉群

####nginx转发ws or wss示例

upstream websocket {  
    server 127.0.0.1:8848;  
}
server {
    ...//...代表您的nginx其他配置
    
    location /wss {  
        proxy_pass http://websocket;  
        proxy_http_version 1.1;  
        proxy_set_header Upgrade $http_upgrade;  
        proxy_set_header Connection "Upgrade";  
    } 
    
}
//配置完成后,修改 style/js/index.js中连接ws部分为:
// __this.ws = new WebSocket("ws" + (ishttps ? "s": "") + "://" + document.domain + "/wss"); //nginx配置ssl做8848转发

github-proxy's People

Contributors

xiaoxinda avatar

Watchers

 avatar

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.