全球主机交流论坛

标题: 【大更新】一键CDN脚本已支持设置与SSL证书一键导入导出 [打印本页]

作者: shc    时间: 2021-12-13 10:30
标题: 【大更新】一键CDN脚本已支持设置与SSL证书一键导入导出
本帖最后由 shc 于 2021-12-13 10:31 编辑

大家好,最近看到坛子里有很多人需求CDN脚本,因此这两天给我去年写的一键安装配置CDN脚本优化了一下。去年原帖链接:https://443502.xyz/thread-719239-1-1.html

2021年12月12日 0.1.0版本大更新:



Github Repo链接,求星星求叉叉,谢谢~
https://github.com/Har-Kuun/OneClickCDN/

一键CDN脚本功能简介:


简易命令行面板示例:


安装命令:
中文:
  1. wget https://raw.githubusercontent.com/Har-Kuun/OneClickCDN/master/translation/translated_scripts/OneClickCDN_zh-CN.sh && sudo bash OneClickCDN_zh-CN.sh
复制代码


英文:
  1. wget https://raw.githubusercontent.com/Har-Kuun/OneClickCDN/master/OneClickCDN.sh && sudo bash OneClickCDN.sh
复制代码



使用方法:
1,使用脚本部署CDN节点
2,将域名解析到CDN节点
3,在CDN节点上添加源站信息
4,开始使用!

如果有任何疑问,可以在这里留言,或者在我的博客上留言https://qing.su/article/oneclick-cdn.html

感谢大家的支持

作者: MeowLove    时间: 2021-12-13 10:32
前排支持,感谢大佬付出
作者: TinyTiny    时间: 2021-12-13 10:33
前排顶大佬
作者: cicvc    时间: 2021-12-13 10:35
已收藏,可能用得上
作者: Sails    时间: 2021-12-13 10:36
火钳留名                                                   
作者: oldtuna    时间: 2021-12-13 10:36
谢谢老大的付出
作者: 逍遥自在    时间: 2021-12-13 10:36
已收藏,支持大佬
作者: 李云龙    时间: 2021-12-13 10:36
我李云龙前来给大佬暖贴,大佬高产优质
作者: ATOM    时间: 2021-12-13 10:37
这个很有必要。
作者: Eric.c    时间: 2021-12-13 10:37
精品,
作者: Ralph    时间: 2021-12-13 10:37
不懂
作者: wang3y2    时间: 2021-12-13 10:37
支持 马上搞一个试试水
作者: boq    时间: 2021-12-13 10:38
可以同时安装宝塔吗?
作者: FXB    时间: 2021-12-13 10:38
真是要什么来什么啊,这俩天一直在研究CDN,部署了kangle和宝塔反向代理,看大佬的这个东西好像更不错啊
作者: louiejordan    时间: 2021-12-13 10:40
不错不错,绑定,虽然用不到
作者: shc    时间: 2021-12-13 10:40
boq 发表于 2021-12-13 10:38
可以同时安装宝塔吗?

不可以,所有CDN都是监听80、443端口,都会和宝塔冲突的
作者: yodayuuki    时间: 2021-12-13 10:41
绑定
作者: KACA7    时间: 2021-12-13 10:43
留名,学习。
作者: popo2731    时间: 2021-12-13 10:46
马克*刘明
作者: fglive    时间: 2021-12-13 10:47
收藏备用,感谢大佬
作者: 队长不在家    时间: 2021-12-13 10:47
大佬牛逼
作者: 四面楚歌    时间: 2021-12-13 10:50
大佬 马克
作者: tomcb    时间: 2021-12-13 10:52
只能管理当前一个节点还是有主控能一键管理所有节点?
作者: yxasi    时间: 2021-12-13 10:53
感谢大佬。
作者: Benladen    时间: 2021-12-13 10:55
先收藏
作者: shc    时间: 2021-12-13 10:59
tomcb 发表于 2021-12-13 10:52
只能管理当前一个节点还是有主控能一键管理所有节点?

没有主控呢,只能分别管理节点。需要主控的话得额外手动安装TrafficControl
作者: leonvero    时间: 2021-12-13 11:01
好像不能自定义规则,不支持br和tls1.3
作者: Winsonkill    时间: 2021-12-13 11:01
好像很牛批的样子Mark
作者: ncnc    时间: 2021-12-13 11:02
不错 以前收藏过你的CDN 要是有面板就更好了
作者: mucstudio    时间: 2021-12-13 11:02
已收藏,可能用得上
作者: shc    时间: 2021-12-13 11:03
leonvero 发表于 2021-12-13 11:01
好像不能自定义规则,不支持br和tls1.3

Brotli, TLS1.3都支持的。自定义缓存规则是最基本的功能,当然是可以的。

CentOS 7不支持TLS1.3,其它系统都支持。
作者: H48    时间: 2021-12-13 11:06
非常不错
作者: Catker    时间: 2021-12-13 11:06
感谢大佬,终于蹲到这个脚本支持Debian11了
作者: myoppo    时间: 2021-12-13 11:06
这才是真大佬啊
作者: 大猫熊    时间: 2021-12-13 11:07
收藏了  支持大佬
作者: 66y    时间: 2021-12-13 11:07
牛逼啊啊。收藏,我的瓦工有用武之地了
作者: 66y    时间: 2021-12-13 11:08
星星,叉叉已点
作者: MAGA    时间: 2021-12-13 11:10
要多少小鸡来部署节点?
作者: leonvero    时间: 2021-12-13 11:11
shc 发表于 2021-12-13 11:03
Brotli, TLS1.3都支持的。自定义缓存规则是最基本的功能,当然是可以的。

CentOS 7不支持TLS1.3,其它系 ...

希望可以增加个判断移动设备的参数,目前市面上很多CDN基本没有这个功能,而nginx_proxy可以实现

#判断移动设备
    set $is_mobile 0;
    if ($http_user_agent ~* (mobile|nokia|iphone|ipad|android|samsung|htc|blackberry)) {
        set $is_mobile 1;
    }
   

    proxy_cache_purge cdn $1$is_args$args$is_mobile;⠀
作者: 66y    时间: 2021-12-13 11:12
这个cdn怎么用的。就是a记录直接指向这个cdn么。是不是必须有域名才可以的。
作者: 箜想    时间: 2021-12-13 11:12
用来自建CDN??
作者: cheshirex    时间: 2021-12-13 11:12
大佬再加个班写个UI,可以拿来卖了
作者: shc    时间: 2021-12-13 11:13
MAGA 发表于 2021-12-13 11:10
要多少小鸡来部署节点?

看你需要多少节点啦,如果只是为了防止CC的话,1个节点就够了
作者: yizhi    时间: 2021-12-13 11:13
这个很好,插个眼
作者: dole    时间: 2021-12-13 11:14
马克!
作者: sakuramai    时间: 2021-12-13 11:14
marke
作者: shc    时间: 2021-12-13 11:16
leonvero 发表于 2021-12-13 11:11
希望可以增加个判断移动设备的参数,目前市面上很多CDN基本没有这个功能,而nginx_proxy可以实现

#判断 ...

好的,我来研究研究看
作者: hwan    时间: 2021-12-13 11:17
顶 收藏了
作者: shc    时间: 2021-12-13 11:17
66y 发表于 2021-12-13 11:12
这个cdn怎么用的。就是a记录直接指向这个cdn么。是不是必须有域名才可以的。 ...

是哒~
作者: boq    时间: 2021-12-13 11:17
shc 发表于 2021-12-13 10:40
不可以,所有CDN都是监听80、443端口,都会和宝塔冲突的

好的  我试试 出了一批手里还有一堆白**小鸡
作者: 66y    时间: 2021-12-13 11:19
boq 发表于 2021-12-13 11:17
好的  我试试 出了一批手里还有一堆白**小鸡

我去,看到监听80   443这没戏了,我基本都装宝塔了。
作者: By小酷    时间: 2021-12-13 11:26
应该做一个主控端面板,节点全部一键安装,设置好对接主控就完事了
作者: 0000S    时间: 2021-12-13 11:27
感谢分享,
作者: 肤白貌美天然呆    时间: 2021-12-13 11:36
大佬 如果要升级的话 直接替换sh文件就行? 在用0.0.5版本
作者: shc    时间: 2021-12-13 11:38
肤白貌美天然呆 发表于 2021-12-13 11:36
大佬 如果要升级的话 直接替换sh文件就行? 在用0.0.5版本

是哒,直接替换sh文件就可以使用新增的导入导出功能~
作者: shc    时间: 2021-12-13 11:39
By小酷 发表于 2021-12-13 11:26
应该做一个主控端面板,节点全部一键安装,设置好对接主控就完事了

属实是不会写
作者: xueyuan    时间: 2021-12-13 11:40
大佬,这个怎么反代cf
作者: 鞠婧祎    时间: 2021-12-13 11:42
大佬,继续完善,写个cdn节点管理面板
作者: 肤白貌美天然呆    时间: 2021-12-13 11:42
shc 发表于 2021-12-13 11:38
是哒,直接替换sh文件就可以使用新增的导入导出功能~

谢谢
作者: Nokia    时间: 2021-12-13 11:45
支持 感谢无私付出与分享  
作者: linearn    时间: 2021-12-13 11:46
很不错,很有用
作者: shc    时间: 2021-12-13 11:46
xueyuan 发表于 2021-12-13 11:40
大佬,这个怎么反代cf

应该不能反代cf吧,只能反代源站…为啥会需要反代cf啊
作者: 雪丫鬟    时间: 2021-12-13 11:48
这个可是好东西啊
作者: xueyuan    时间: 2021-12-13 12:18
shc 发表于 2021-12-13 11:46
应该不能反代cf吧,只能反代源站…为啥会需要反代cf啊

因为源站放在欧洲,直接反代源站,速度也快不到哪里去。
作者: sah    时间: 2021-12-13 12:26
弱弱的问一下CDN和nginx反代有什么不同么
作者: 52怡宝    时间: 2021-12-13 12:27
谢谢大佬分享
作者: 花落无声    时间: 2021-12-13 12:27
收藏备用。
作者: 老猹    时间: 2021-12-13 12:28
支持香菇肥牛大佬感谢分享。
作者: cooioobb    时间: 2021-12-13 12:29
shc 发表于 2021-12-13 10:40
不可以,所有CDN都是监听80、443端口,都会和宝塔冲突的

宝塔不装ng ap就好了呀
作者: lzyroot    时间: 2021-12-13 12:29
NB,感谢分享
作者: shc    时间: 2021-12-13 12:30
sah 发表于 2021-12-13 12:26
弱弱的问一下CDN和nginx反代有什么不同么

差不太多,这个功能多一点,nginx轻量一点~
作者: Able    时间: 2021-12-13 12:31
支持大佬,这个很有必要
作者: shc    时间: 2021-12-13 12:31
cooioobb 发表于 2021-12-13 12:29
宝塔不装ng ap就好了呀

啊这,我没用过宝塔呢,反正不占用80、443端口就可以
作者: 往事随风    时间: 2021-12-13 12:31
不错,感谢分享,后排dd
作者: 奔跑的路由器    时间: 2021-12-13 13:04
感谢大佬分享。
作者: tomcb    时间: 2021-12-13 13:06
shc 发表于 2021-12-13 10:59
没有主控呢,只能分别管理节点。需要主控的话得额外手动安装TrafficControl ...

建议加上主控,不然也是一个个节点每个要操作一遍
作者: tirophy    时间: 2021-12-13 13:08
收藏了,大佬
作者: MAGA    时间: 2021-12-13 13:24
shc 发表于 2021-12-13 11:13
看你需要多少节点啦,如果只是为了防止CC的话,1个节点就够了

多谢,也就是给自己真正的服务器套个马甲,是这个意思吗?

能不能实现类似CF的那种,用乌龟壳来套
作者: shc    时间: 2021-12-13 13:30
tomcb 发表于 2021-12-13 13:06
建议加上主控,不然也是一个个节点每个要操作一遍

是哒,不过主控太难了,我来研究研究
作者: taigt    时间: 2021-12-13 13:32
收藏一下
作者: shc    时间: 2021-12-13 13:32
MAGA 发表于 2021-12-13 13:24
多谢,也就是给自己真正的服务器套个马甲,是这个意思吗?

能不能实现类似CF的那种,用乌龟壳来套 ...

是哒,多弄几个节点就和CF差不多了呀~

乌龟壳是啥…
作者: CARY.    时间: 2021-12-13 13:32
谢谢老大的付出
作者: MAGA    时间: 2021-12-13 13:34
shc 发表于 2021-12-13 13:32
是哒,多弄几个节点就和CF差不多了呀~

乌龟壳是啥…

乌龟壳就是甲骨文,看到有人搞定了所有的免费节点.
作者: Zeros    时间: 2021-12-13 13:38
大佬牛皮,绑定
作者: shc    时间: 2021-12-13 13:39
MAGA 发表于 2021-12-13 13:34
乌龟壳就是甲骨文,看到有人搞定了所有的免费节点.

我还真不知道这玩意儿在ARM上面能不能编译了,如果能编译的话就可以的
作者: 镜子里的我    时间: 2021-12-13 13:39
粗略看了一下,还不错,帮顶
作者: aRNoLD    时间: 2021-12-13 13:59
这下做站的手里又有多个不同地区机器的就有福利了
作者: 蝼蚁般的存在    时间: 2021-12-13 14:03
shc 发表于 2021-12-13 13:39
我还真不知道这玩意儿在ARM上面能不能编译了,如果能编译的话就可以的

可以,装过了,然后用ACME+DNS解析解决了证书问题
作者: 88170351    时间: 2021-12-13 14:06

作者: peng123    时间: 2021-12-13 14:15
支持大佬,收藏了
作者: ymh1147    时间: 2021-12-13 14:24
收藏备用!
作者: lisa2016    时间: 2021-12-13 14:26
shc 发表于 2021-12-13 10:40
不可以,所有CDN都是监听80、443端口,都会和宝塔冲突的

trafficserver-8.1.3.tar.bz2                                         100%[==================================================================================================================================================================>]   8.60M  25.1MB/s    in 0.3s   

2021-12-13 14:23:16 (25.1 MB/s) - ‘trafficserver-8.1.3.tar.bz2’ saved [9013417/9013417]

开始从源文件编译Traffic Server...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking whether make supports nested variables... (cached) yes
checking for chosen layout... TrafficServer
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether to enable debugging... no
checking whether to enable mime sanity check... no
checking whether to code coverage... no
checking whether to enable -Werror... no
checking whether to enable asan... no
checking whether to enable lsan... no
checking whether to enable tsan... no
checking whether to enable fast SDK APIs... no
checking whether to enable CURL... yes
checking for a sed that does not truncate output... /bin/sed
checking for curl-config... /usr/bin/curl-config
checking for curl (7.52.1) >= 7.19... yes
checking whether to enable diags... yes
checking whether to enable fips... no
checking whether to enable regression tests... yes
checking for java... no
checking whether to build documentation... no
checking whether to commit cov defects to remote host... localhost
checking whether to enable WCCP v2 support... no
checking whether to enable profiler... no
checking whether to enable eventfd()... yes
checking whether to use POSIX capabilities... auto
checking whether to use hwloc library... yes
checking whether to enable ccache... no
checking whether to enable hardening of the executables... no
checking whether to enable SSLv3 config for origin connections... no
checking whether to enable TPROXY based transparency... auto
checking whether to enable experimental plugins... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBMEMCACHED... no
checking for LIBMAGICKCPP... no
checking for LIBMAGICKCPP... no
checking whether to install example plugins... no
checking whether to install testing tools... no
checking whether to allow 32-bit builds... no
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking whether cc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of cc... gcc3
checking for c++... c++
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking how to run the C preprocessor... cc -E
checking how to run the C++ preprocessor... c++ -E
checking dependency style of cc... gcc3
checking for C compiler vendor... gnu
checking checking whether c++ -std=c++17 supports -std=c++17... no
configure: error: *** A compiler with support for -std=c++17 is required.

依赖环境缺失。 可是我新装的系统啊  难道不支持 Debian9 强烈求助支持Debian9 毕竟9还是很多人在用的!
作者: 度百    时间: 2021-12-13 14:31
前天刚用langle捣鼓了一个节点,今天就看到大佬的项目更新,在研究下
作者: shc    时间: 2021-12-13 14:33
lisa2016 发表于 2021-12-13 14:26
trafficserver-8.1.3.tar.bz2                                         100%[========================= ...

抱歉不支持Debian 9的,只支持Debian 10/11.  如果要支持Debian 9需要修改很多代码,而且需要手动编译各种组件,确实是太麻烦了。

建议是重装成Debian 10/11,毕竟Debian 9到明年6月份就停止官方支持了,到时候无论如何都得升级了。
作者: myseil    时间: 2021-12-13 14:34
收藏备用吧  目前用其他的cdn
作者: huang1dede    时间: 2021-12-13 15:05
自建全球cdn么.......
作者: yoki_    时间: 2021-12-13 16:24
mark住
作者: kvavilang    时间: 2021-12-13 16:52
火速留名啊
作者: 326412908a    时间: 2021-12-13 16:58
送上第一个星星
作者: CapitalTeemo    时间: 2021-12-13 17:36
感谢分享




欢迎光临 全球主机交流论坛 (https://443502.xyz/) Powered by Discuz! X3.4