Skip to content

gimee/openwrt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions-OpenWrt

LICENSE GitHub Stars GitHub Forks

Build OpenWrt using GitHub Actions

Read the details in my blog (in Chinese) | 中文教程

openwrt 固件编译自定义主题与软件 https://github.com/kenzok8/openwrt-packages

lede大固件 https://github.com/coolsnowwolf/lede

Usage

  • Click the Use this template button to create a new repository.
  • Generate .config files using Lean's OpenWrt source code. ( You can change it through environment variables in the workflow file. )
  • Push .config file to the GitHub repository.
  • Select Build OpenWrt on the Actions page.
  • Click the Run workflow button.
  • When the build is complete, click the Artifacts button in the upper right corner of the Actions page to download the binaries.

Tips

  • It may take a long time to create a .config file and build the OpenWrt firmware. Thus, before create repository to build your own firmware, you may check out if others have already built it which meet your needs by simply search Actions-Openwrt in GitHub.
  • Add some meta info of your built firmware (such as firmware architecture and installed packages) to your repository introduction, this will save others' time.

Acknowledgments

License

MIT © P3TERX

=================安装V2ray=====================

一键安装:bash <(curl -sL https://raw.githubusercontent.com/hijkpw/scripts/master/centos_install_v2ray2.sh)

其他

  1. 查看v2ray运行状态 / 配置:bash <(curl -sL https://raw.githubusercontent.com/hijkpw/scripts/master/centos_install_v2ray2.sh) info

  2. v2ray管理命令:启动:systemctl start v2ray,停止:systemctl stop v2ray,重启:systemctl restart v2ray;

  3. nginx管理命令:测试配置文件有无错误:nginx -t,启动:systemctl start nginx,停止:systemct stop nginx,重启:systemctl restart nginx;

  4. 更新v2ray到最新版:bash <(curl -sL https://raw.githubusercontent.com/hijkpw/scripts/master/goV2.sh)(提示“装不上daemon”不用管,systemctl restart v2ray重新启动v2ray就好了)

  5. 查看SSL证书:certbot certificates,更新证书:systemctl stop nginx; certbot renew; systemctl restart nginx

  6. 卸载: bash <(curl -sL https://raw.githubusercontent.com/hijkpw/scripts/master/centos_install_v2ray2.sh) uninstall;

  7. 配置文件: /etc/v2ray/config.json ,自己可以修改。启动:systemctl start v2ray,停止:systemctl stop v2ray,重启:systemctl restart v2ray;

静态网站 静态网站是最简单的网站,既可以上传个人作品/模板做展示站,也可以托管文件当ftp、网盘。

将小说站改成静态网站的操作非常简单:编辑 /etc/nginx/conf.d/你的域名.conf 文件(你的域名换成真实域名),删除 proxy_pass xxxx 这一行(第28行),然后重启Nginx。xiaoshuosk

一键修改脚本: domain=cat /etc/v2ray/config.json | grep Host | cut -d: -f2 | tr -d \",' ' confpath="/etc/nginx/conf.d/" if [ ! -f $confpath${domain}.conf ]; then confpath="/www/server/panel/vhost/nginx/" fi sed -i '28d' ${confpath}${domain}.conf nginx -s reload

接下来,将你的文件上传到 /usr/share/nginx/html 文件夹,就可以通过 https://你的域名/文件路径 的方式访问上传的网页或者文件了。文件上传操作可参考 Bitvise连接Linux服务器教程 或者 Mac电脑连接Linux教程。

反向代理网站 默认的小说站就是反向代理,如果你想换成其他网站,例如百度,把 /etc/nginx/conf.d/你的域名.conf 文件的 proxy_pass xxxx 这一行(第28行)改成 proxy_pass http://www.baidu.com ,然后重启Nginx。

这种建站方式简单粗暴,实践时也有一些坑。例如Nginx不支持反向代理http2的网站,如果后端网站是h2,需要设置 proxy_http_version 1.1;后端网站的一些链接可能不是相对路径,需要用 proxy_redirect 替换。等等问题本文不再细说,请参考Nginx官方文档。

======================================= 如果做旁路由,要在旁路由防火墙上添加规则,要不会很慢

iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%