├── Makefile ├── README.md ├── do_accesslog ├── icmp ├── img └── login.png ├── inotify-tools-3.14.tar.gz ├── install ├── iptables ├── iptables.conf ├── iptables_start ├── nginx.conf ├── nginx ├── conf.d │ ├── ocdn-template.conf │ ├── ssl.conf │ └── virtual.conf ├── fastcgi.conf ├── fastcgi.conf.default ├── fastcgi_params ├── fastcgi_params.default ├── koi-utf ├── koi-win ├── mime.types ├── mime.types.default ├── nginx.conf ├── nginx.conf.default ├── proxy_pass.conf ├── scgi_params ├── scgi_params.default ├── uwsgi_params ├── uwsgi_params.default └── win-utf ├── ocdn.conf ├── ocdn.tar.gz ├── ocdn ├── .htaccess ├── cdn_info.sql ├── common.php ├── database.php ├── index.php ├── model │ ├── dnspod.php │ ├── domain.php │ ├── node.php │ └── user.php ├── resource │ ├── artDialog │ │ ├── artDialog.js │ │ ├── artDialog.source.js │ │ ├── index.html │ │ ├── jquery.artDialog.js │ │ ├── jquery.artDialog.source.js │ │ ├── license.txt │ │ ├── plugins │ │ │ ├── iframeTools.js │ │ │ └── iframeTools.source.js │ │ └── skins │ │ │ ├── aero.css │ │ │ ├── aero │ │ │ ├── aero_s.png │ │ │ ├── aero_s2.png │ │ │ └── ie6 │ │ │ │ ├── aui_close.hover.png │ │ │ │ ├── aui_close.png │ │ │ │ ├── aui_e.png │ │ │ │ ├── aui_n.png │ │ │ │ ├── aui_ne.png │ │ │ │ ├── aui_nw.png │ │ │ │ ├── aui_s.png │ │ │ │ ├── aui_se.png │ │ │ │ ├── aui_sw.png │ │ │ │ ├── aui_title_icon.png │ │ │ │ └── aui_w.png │ │ │ ├── black.css │ │ │ ├── black │ │ │ ├── bg.png │ │ │ ├── bg2.png │ │ │ ├── bg_css3.png │ │ │ ├── bg_css3_2.png │ │ │ └── ie6 │ │ │ │ ├── close.hover.png │ │ │ │ ├── close.png │ │ │ │ ├── e.png │ │ │ │ ├── n.png │ │ │ │ ├── ne.png │ │ │ │ ├── nw.png │ │ │ │ ├── s.png │ │ │ │ ├── se.png │ │ │ │ ├── sw.png │ │ │ │ └── w.png │ │ │ ├── blue.css │ │ │ ├── blue │ │ │ ├── bg.png │ │ │ ├── bg2.png │ │ │ ├── bg_css3.png │ │ │ ├── bg_css3_2.png │ │ │ └── ie6 │ │ │ │ ├── close.hover.png │ │ │ │ ├── close.png │ │ │ │ ├── e.png │ │ │ │ ├── n.png │ │ │ │ ├── ne.png │ │ │ │ ├── nw.png │ │ │ │ ├── s.png │ │ │ │ ├── se.png │ │ │ │ ├── sw.png │ │ │ │ └── w.png │ │ │ ├── chrome.css │ │ │ ├── chrome │ │ │ ├── border.png │ │ │ └── chrome_s.png │ │ │ ├── default.css │ │ │ ├── green.css │ │ │ ├── green │ │ │ ├── bg.png │ │ │ ├── bg2.png │ │ │ ├── bg_css3.png │ │ │ ├── bg_css3_2.png │ │ │ ├── color_bg.png │ │ │ └── ie6 │ │ │ │ ├── close.hover.png │ │ │ │ ├── close.png │ │ │ │ ├── e.png │ │ │ │ ├── n.png │ │ │ │ ├── ne.png │ │ │ │ ├── nw.png │ │ │ │ ├── s.png │ │ │ │ ├── se.png │ │ │ │ ├── sw.png │ │ │ │ └── w.png │ │ │ ├── icons │ │ │ ├── error.png │ │ │ ├── face-sad.png │ │ │ ├── face-smile.png │ │ │ ├── loading.gif │ │ │ ├── question.png │ │ │ ├── succeed.png │ │ │ └── warning.png │ │ │ ├── idialog.css │ │ │ ├── idialog │ │ │ ├── idialog_s.png │ │ │ ├── idialog_s2.png │ │ │ └── ie6 │ │ │ │ ├── aui_close.hover.png │ │ │ │ ├── aui_close.png │ │ │ │ ├── aui_e.png │ │ │ │ ├── aui_n.png │ │ │ │ ├── aui_ne.png │ │ │ │ ├── aui_nw.png │ │ │ │ ├── aui_s.png │ │ │ │ ├── aui_se.png │ │ │ │ ├── aui_sw.png │ │ │ │ └── aui_w.png │ │ │ ├── ocdn.css │ │ │ ├── opera.css │ │ │ ├── opera │ │ │ ├── ie6 │ │ │ │ ├── aui_close.hover.png │ │ │ │ ├── aui_close.png │ │ │ │ ├── aui_e.png │ │ │ │ ├── aui_n.png │ │ │ │ ├── aui_ne.png │ │ │ │ ├── aui_nw.png │ │ │ │ ├── aui_s.png │ │ │ │ ├── aui_se.png │ │ │ │ ├── aui_sw.png │ │ │ │ └── aui_w.png │ │ │ ├── s1.png │ │ │ └── s2.png │ │ │ ├── simple.css │ │ │ └── twitter.css │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap-responsive.css │ │ │ ├── bootstrap-responsive.min.css │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.min.css │ │ │ └── old_bak.rar │ │ ├── img │ │ │ ├── glyphicons-halflings-white.png │ │ │ └── glyphicons-halflings.png │ │ └── js │ │ │ ├── bootstrap.js │ │ │ └── bootstrap.min.js │ ├── global.js │ ├── highcharts │ │ ├── examples │ │ │ ├── area-basic │ │ │ │ └── index.htm │ │ │ ├── area-inverted │ │ │ │ └── index.htm │ │ │ ├── area-missing │ │ │ │ └── index.htm │ │ │ ├── area-negative │ │ │ │ └── index.htm │ │ │ ├── area-stacked-percent │ │ │ │ └── index.htm │ │ │ ├── area-stacked │ │ │ │ └── index.htm │ │ │ ├── arearange │ │ │ │ └── index.htm │ │ │ ├── areaspline │ │ │ │ └── index.htm │ │ │ ├── bar-basic │ │ │ │ └── index.htm │ │ │ ├── bar-negative-stack │ │ │ │ └── index.htm │ │ │ ├── bar-stacked │ │ │ │ └── index.htm │ │ │ ├── column-basic │ │ │ │ └── index.htm │ │ │ ├── column-drilldown │ │ │ │ └── index.htm │ │ │ ├── column-negative │ │ │ │ └── index.htm │ │ │ ├── column-parsed │ │ │ │ └── index.htm │ │ │ ├── column-rotated-labels │ │ │ │ └── index.htm │ │ │ ├── column-stacked-and-grouped │ │ │ │ └── index.htm │ │ │ ├── column-stacked-percent │ │ │ │ └── index.htm │ │ │ ├── column-stacked │ │ │ │ └── index.htm │ │ │ ├── columnrange │ │ │ │ └── index.htm │ │ │ ├── combo-dual-axes │ │ │ │ └── index.htm │ │ │ ├── combo-multi-axes │ │ │ │ └── index.htm │ │ │ ├── combo-regression │ │ │ │ └── index.htm │ │ │ ├── combo │ │ │ │ └── index.htm │ │ │ ├── dynamic-click-to-add │ │ │ │ └── index.htm │ │ │ ├── dynamic-master-detail │ │ │ │ └── index.htm │ │ │ ├── dynamic-update │ │ │ │ └── index.htm │ │ │ ├── gauge-clock │ │ │ │ └── index.htm │ │ │ ├── gauge-dual │ │ │ │ └── index.htm │ │ │ ├── gauge-speedometer │ │ │ │ └── index.htm │ │ │ ├── gauge-vu-meter │ │ │ │ └── index.htm │ │ │ ├── line-ajax │ │ │ │ ├── analytics.tsv │ │ │ │ └── index.htm │ │ │ ├── line-basic │ │ │ │ └── index.htm │ │ │ ├── line-labels │ │ │ │ └── index.htm │ │ │ ├── line-log-axis │ │ │ │ └── index.htm │ │ │ ├── line-time-series │ │ │ │ └── index.htm │ │ │ ├── pie-basic │ │ │ │ └── index.htm │ │ │ ├── pie-donut │ │ │ │ └── index.htm │ │ │ ├── pie-gradient │ │ │ │ └── index.htm │ │ │ ├── pie-legend │ │ │ │ └── index.htm │ │ │ ├── polar-spider │ │ │ │ └── index.htm │ │ │ ├── polar-wind-rose │ │ │ │ └── index.htm │ │ │ ├── polar │ │ │ │ └── index.htm │ │ │ ├── scatter │ │ │ │ └── index.htm │ │ │ ├── spline-inverted │ │ │ │ └── index.htm │ │ │ ├── spline-irregular-time │ │ │ │ └── index.htm │ │ │ ├── spline-plot-bands │ │ │ │ └── index.htm │ │ │ └── spline-symbols │ │ │ │ └── index.htm │ │ ├── exporting-server │ │ │ ├── java │ │ │ │ ├── highcharts-export │ │ │ │ │ ├── pom.xml │ │ │ │ │ └── src │ │ │ │ │ │ └── main │ │ │ │ │ │ ├── java │ │ │ │ │ │ └── com │ │ │ │ │ │ │ └── highcharts │ │ │ │ │ │ │ └── export │ │ │ │ │ │ │ ├── controller │ │ │ │ │ │ │ └── ExportController.java │ │ │ │ │ │ │ ├── filters │ │ │ │ │ │ │ └── DefaultEncodingFilter.java │ │ │ │ │ │ │ └── util │ │ │ │ │ │ │ ├── MimeType.java │ │ │ │ │ │ │ ├── SVGRasterizer.java │ │ │ │ │ │ │ └── SVGRasterizerException.java │ │ │ │ │ │ ├── resources │ │ │ │ │ │ └── log4j.properties │ │ │ │ │ │ └── webapp │ │ │ │ │ │ └── WEB-INF │ │ │ │ │ │ └── web.xml │ │ │ │ └── install.txt │ │ │ ├── phantomjs │ │ │ │ ├── highcharts-convert.js │ │ │ │ └── readme.md │ │ │ └── php │ │ │ │ ├── php-batik │ │ │ │ ├── index-with-imagick.php │ │ │ │ └── index.php │ │ │ │ └── php-phantomjs │ │ │ │ ├── .project │ │ │ │ ├── .settings │ │ │ │ ├── .jsdtscope │ │ │ │ ├── org.eclipse.wst.jsdt.ui.superType.container │ │ │ │ └── org.eclipse.wst.jsdt.ui.superType.name │ │ │ │ ├── demo.html │ │ │ │ ├── index.php │ │ │ │ └── readme.md │ │ ├── gfx │ │ │ └── vml-radial-gradient.png │ │ ├── graphics │ │ │ ├── skies.jpg │ │ │ ├── snow.png │ │ │ └── sun.png │ │ ├── index.htm │ │ └── js │ │ │ ├── adapters │ │ │ ├── mootools-adapter.js │ │ │ ├── mootools-adapter.src.js │ │ │ ├── prototype-adapter.js │ │ │ └── prototype-adapter.src.js │ │ │ ├── highcharts-more.js │ │ │ ├── highcharts-more.src.js │ │ │ ├── highcharts.js │ │ │ ├── highcharts.src.js │ │ │ ├── modules │ │ │ ├── canvas-tools.js │ │ │ ├── canvas-tools.src.js │ │ │ ├── data.js │ │ │ ├── data.src.js │ │ │ ├── exporting.js │ │ │ └── exporting.src.js │ │ │ └── themes │ │ │ ├── dark-blue.js │ │ │ ├── dark-green.js │ │ │ ├── gray.js │ │ │ ├── grid.js │ │ │ └── skies.js │ ├── image │ │ ├── 2103be7265c97e10b93c442260c6cb9d.png │ │ ├── dnspod-logo-source.png │ │ ├── dnspod-mini.png │ │ ├── dnspod.png │ │ ├── index-bg.jpg │ │ ├── load.gif │ │ ├── nav-dnspod.png │ │ ├── nav-node.png │ │ └── nav-site.png │ ├── jquery-1.9.0.min.js │ ├── less-1.3.3.min.js │ └── style.less └── view │ ├── default.html │ ├── domain.html │ ├── domainSet.html │ ├── footer.html │ ├── header.html │ ├── node.html │ ├── nodeInfo.html │ ├── profile.html │ ├── purge.html │ └── reg.html ├── ocdn_console ├── opencdn ├── opencdn-console.spec ├── opencdn.conf ├── read_info ├── rpm └── centos │ └── 6 │ ├── 64 │ ├── inotify-tools-3.14-1.el6.x86_64.rpm │ ├── opencdn-console-1.1-1.el6-noarch.rpm │ ├── opencdn-console-1.1-2.el6-noarch.rpm │ └── syslog-ng-3.2.5-6.el6.x86_64.rpm │ └── i386 │ ├── inotify-tools-3.14-1.el6.i686.rpm │ ├── opencdn-console-1.1-2.el6-noarch.rpm │ └── syslog-ng-3.2.5-6.el6.i686.rpm ├── rsync_send ├── syn_node ├── syslog-ng.conf ├── test.c ├── uninstall ├── upgrade_php └── 目录结构.txt /Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | install -p -d -m 0755 $(PREFIX)/usr/local/opencdn/conf/ 3 | install -p -d -m 0755 $(PREFIX)/usr/local/opencdn/conf_rsync/ 4 | install -p -d -m 0755 $(PREFIX)/usr/local/opencdn/node_logs/ 5 | install -p -d -m 0755 $(PREFIX)/usr/local/opencdn/ocdn/ 6 | install -p -d -m 0755 $(PREFIX)/usr/local/opencdn/pipe/ 7 | install -p -d -m 0755 $(PREFIX)/usr/local/opencdn/sbin/ 8 | install -p -d -m 0755 $(PREFIX)/var/log/opencdn/ 9 | install -p -m 0755 opencdn.conf $(PREFIX)/usr/local/opencdn/conf/ 10 | install -p -m 0755 do_accesslog $(PREFIX)/usr/local/opencdn/sbin/ 11 | install -p -m 0755 icmp $(PREFIX)/usr/local/opencdn/sbin/ 12 | install -p -m 0755 read_info $(PREFIX)/usr/local/opencdn/sbin/ 13 | install -p -m 0755 rsync_send $(PREFIX)/usr/local/opencdn/sbin/ 14 | install -p -m 0755 syn_node $(PREFIX)/usr/local/opencdn/sbin/ 15 | -\cp -dpr ocdn/* $(PREFIX)/usr/local/opencdn/ocdn/ 16 | -\cp -dpr conf_rsync/* $(PREFIX)/usr/local/opencdn/conf_rsync/ 17 | clean: 18 | @rm -f *.rpm 19 | rpm: 20 | rpmbuild -bb opencdn-console.spec 21 | 22 | .PHONY:rpm 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ###主控端安装手册 2 | 3 | ###LAMP环境配置 4 | 5 | **本文档以 Centos 6.x 86_64 为蓝本** 本文档约定 所有命令以#打头 6 | 7 | #wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm 8 | 9 | #wget http://58.215.133.101:801/rpm/inotify-tools-3.14-1.el6.x86_64.rpm 10 | 11 | #wget http://58.215.133.101:801/rpm/opencdn-console-1.1-2.el6-noarch.rpm 12 | 13 | #rpm -ivh epel-release-6-8.noarch.rpm 14 | 15 | #rpm -ivh inotify-tools-3.14-1.el6.x86_64.rpm 16 | 17 | **yum -y localinstall opencdn-console-1.1-2.el6-noarch.rpm** 推荐这么安装。会动解决依赖关系. 18 | 19 | 检查Selinux状态 20 | 21 | #sestatus 22 | 23 | 如果输出不为 SELinux status: disabled .可以昨时先关闭 .命令如下: 24 | 25 | #setenforce 0 26 | 27 | 永久关闭方法: 28 | 29 | #vim /etc/sysconfig/selinux 把SELINUX=disabled 并重启系统 30 | 31 | #启动Mysql 并设置密码 32 | 33 | #service mysqld start 34 | 35 | #/usr/bin/mysqladmin -u root password '123' 设置mysql密码 36 | 37 | ####导入数据 38 | 39 | #cd /usr/local/opencdn/ocdn 40 | 41 | #mysql -uroot -p123 -e 'create database cdn_info' 新建cdn_info数据库 42 | 43 | #mysql -uroot -p123 cdn_info http 50 | 51 | /etc/init.d/httpd restart 52 | 53 | ####启动opencdn 54 | 55 | #/etc/init.d/opencdn restart 56 | 57 | 检查一下opencdn开启状态,查看日志。查看有没有异常. 58 | 59 | #cd /var/log/opencdn/ 相看相关日志 60 | 61 | 62 | ####启动服务 63 | 64 | #service httpd restart 65 | 66 | **访问http://x.x.x.x/ocdn/index.php** 67 | 68 | **默认用户名:admin@ocdn.me 密码:ocdn.me** 69 | 70 | ####截图如下: 71 | 72 | ![Alt text](img/login.png "前台login截图") 73 | 74 | -------------------------------------------------------------------------------- /do_accesslog: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | LINE="" 4 | KEY='-&@&' 5 | 6 | OPENCDN_PIPE_PATH="/usr/local/opencdn/pipe" 7 | tmp_fifo="${OPENCDN_PIPE_PATH}/access.pipe" 8 | if [ ! -p "${tmp_fifo}" ] 9 | then 10 | mkfifo "${tmp_fifo}" 11 | service syslog-ng restart 12 | service nginx restart 13 | fi 14 | 15 | exec 6<>$tmp_fifo 16 | NODE_LOGS_PATH="/usr/local/opencdn/node_logs" 17 | if [ ! -d "${NODE_LOGS_PATH}" ];then 18 | mkdir -p "${NODE_LOGS_PATH}" 19 | fi 20 | 21 | while : 22 | do 23 | read -u6 LINE 24 | WEB_SITE=`echo $LINE | awk -F '-&@&' '{print $2}' | sed 's/\./_/g'` 25 | echo `echo $LINE | awk -F '-&@&' '{print $1}'` >> ${NODE_LOGS_PATH}/${WEB_SITE}_access.log 26 | #echo `echo $LINE | awk -F '-&@&' '{print $1}'` 27 | done 28 | 29 | wait 30 | exec 6>&- 31 | -------------------------------------------------------------------------------- /icmp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import MySQLdb 4 | import os,sys,time 5 | pwd=os.popen('cat /usr/local/opencdn/conf/opencdn.conf | grep DB_PassWord | awk -F= \'{print $2}\'').read() 6 | db=MySQLdb.connect('127.0.0.1','root',pwd[:-1],'cdn_info') 7 | print 'Database connected.' 8 | cur=db.cursor() 9 | while 1: 10 | cur.execute("select NodeIP from node_info;") 11 | rows=cur.fetchall() 12 | for i in range(0,len(rows)): 13 | cmd='ping -W 3 -c 2 '+rows[i][0] 14 | a=os.popen(cmd).read() 15 | if (a.find("time=")!=-1): 16 | print '\033[92m'+rows[i][0]+' is up'+'\033[0m' 17 | cur.execute("update node_info set Status='on' where NodeIP='"+rows[i][0]+"';") 18 | else: 19 | print '\033[91m'+rows[i][0]+' is down.'+'\033[0m' 20 | cur.execute("update node_info set status='off' where NodeIP='"+rows[i][0]+"';") 21 | time.sleep(5) 22 | -------------------------------------------------------------------------------- /img/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/img/login.png -------------------------------------------------------------------------------- /inotify-tools-3.14.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/inotify-tools-3.14.tar.gz -------------------------------------------------------------------------------- /iptables.conf: -------------------------------------------------------------------------------- 1 | # Firewall configuration written by system-config-firewall 2 | # Manual customization of this file is not recommended. 3 | *filter 4 | :INPUT ACCEPT [0:0] 5 | :FORWARD ACCEPT [0:0] 6 | :OUTPUT ACCEPT [0:0] 7 | -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT 8 | -A INPUT -p icmp -j ACCEPT 9 | -A INPUT -i lo -j ACCEPT 10 | -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT 11 | -A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT 12 | -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT 13 | -A INPUT -m state --state NEW -m tcp -p tcp --dport 873 -j ACCEPT 14 | -A INPUT -m state --state NEW -m udp -p udp --dport 514 -j ACCEPT 15 | -A INPUT -m state --state NEW -m udp -p udp --dport 515 -j ACCEPT 16 | -A INPUT -m state --state NEW -m udp -p udp --dport 516 -j ACCEPT 17 | -A INPUT -j REJECT --reject-with icmp-host-prohibited 18 | -A FORWARD -j REJECT --reject-with icmp-host-prohibited 19 | COMMIT 20 | -------------------------------------------------------------------------------- /nginx.conf: -------------------------------------------------------------------------------- 1 | user www www; 2 | 3 | worker_processes 1; 4 | 5 | error_log /home/wwwlogs/nginx_error.log crit; 6 | 7 | pid /usr/local/nginx/logs/nginx.pid; 8 | 9 | #Specifies the value for maximum file descriptors that can be opened by this process. 10 | worker_rlimit_nofile 51200; 11 | events 12 | { 13 | use epoll; 14 | worker_connections 51200; 15 | } 16 | 17 | http 18 | { 19 | include mime.types; 20 | default_type application/octet-stream; 21 | 22 | server_names_hash_bucket_size 128; 23 | client_header_buffer_size 32k; 24 | large_client_header_buffers 4 32k; 25 | client_max_body_size 50m; 26 | 27 | sendfile on; 28 | tcp_nopush on; 29 | 30 | keepalive_timeout 60; 31 | 32 | tcp_nodelay on; 33 | 34 | fastcgi_connect_timeout 300; 35 | fastcgi_send_timeout 300; 36 | fastcgi_read_timeout 300; 37 | fastcgi_buffer_size 64k; 38 | fastcgi_buffers 4 64k; 39 | fastcgi_busy_buffers_size 128k; 40 | fastcgi_temp_file_write_size 256k; 41 | 42 | gzip on; 43 | gzip_min_length 1k; 44 | gzip_buffers 4 16k; 45 | gzip_http_version 1.0; 46 | gzip_comp_level 2; 47 | gzip_types text/plain application/x-javascript text/css application/xml; 48 | gzip_vary on; 49 | 50 | #limit_zone crawler $binary_remote_addr 10m; 51 | 52 | #log format 53 | log_format access '$remote_addr - $remote_user [$time_local] "$request" ' 54 | '$status $body_bytes_sent "$http_referer" ' 55 | '"$http_user_agent" $http_x_forwarded_for'; 56 | 57 | server 58 | { 59 | listen 80; 60 | server_name _; 61 | index index.html index.htm index.php; 62 | root /usr/local/opencdn/ocdn; 63 | 64 | location ~ .*\.(php|php5)?$ 65 | { 66 | try_files $uri =404; 67 | fastcgi_pass unix:/tmp/php-cgi.sock; 68 | fastcgi_index index.php; 69 | include fcgi.conf; 70 | } 71 | location /ocdn/ 72 | { 73 | index index.php; 74 | if (!-e $request_filename) { 75 | rewrite ^/(.*)$ /ocdn/index.php?$1 last; 76 | break; 77 | } 78 | } 79 | 80 | 81 | location /status { 82 | stub_status on; 83 | access_log off; 84 | } 85 | 86 | location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ 87 | { 88 | expires 30d; 89 | } 90 | 91 | location ~ .*\.(js|css)?$ 92 | { 93 | expires 12h; 94 | } 95 | 96 | access_log /home/wwwlogs/access.log access; 97 | } 98 | include vhost/*.conf; 99 | 100 | } 101 | 102 | -------------------------------------------------------------------------------- /nginx/conf.d/ocdn-template.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name www.ocdn.me; 4 | gzip on; 5 | 6 | #root /home/cache/cdntest; 7 | 8 | if (-d $request_filename) { 9 | rewrite ^/(.*)([^/])$ $scheme://$host/$1$2/ permanent; 10 | } 11 | 12 | ## Cache For Total 13 | location / { 14 | proxy_cache cache_one; 15 | proxy_cache_valid 200 304 1d; #Cache for 1Days 16 | proxy_cache_key $host$uri$is_args$args; 17 | proxy_redirect off; 18 | proxy_pass http://106.187.99.136; 19 | proxy_set_header Host $host; 20 | proxy_set_header X-Real-IP $remote_addr; 21 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 22 | # proxy_ignore_headers "Cache-Control" "Expires"; 23 | expires 2d; 24 | 25 | ## Ctrl+F5 Cache Purge 26 | if ($http_Cache_Control ~ "no-cache") { 27 | # set $http_Cache_Control 'max-age=604800'; 28 | rewrite ^(.*)$ /purge$1 last; 29 | } 30 | 31 | ## Logging Access 32 | access_log /usr/local/opencdn/access.pipe access; 33 | #access_log /home/logs/ocdn-access.log; 34 | #error_log /home/logs/ocdn-error.log; 35 | } 36 | 37 | ## Cache For css and js 38 | location ~ .*\.(js|css)$ { 39 | proxy_cache cache_one; 40 | proxy_cache_valid 200 304 1d; #Cache for 1Days 41 | proxy_cache_key $host$uri$is_args$args; 42 | proxy_set_header Host $host; 43 | 44 | if (!-f $request_filename) { 45 | proxy_pass http://106.187.99.136; 46 | break; 47 | } 48 | } 49 | 50 | ## Not Cache 51 | location ~ .*\.(php|jsp|cgi|asp|aspx|flv|swf|xml|do|rar|zip|rmvb|mp3|doc|docx|xls|pdf|gz|tgz|rm|exe)?$ { 52 | proxy_pass http://106.187.99.136; 53 | proxy_set_header Host $host; 54 | proxy_redirect off; 55 | proxy_set_header X-Real-IP $remote_addr; 56 | # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 57 | } 58 | 59 | ## Cache_proxy Purge 60 | location ~ /purge(/.*) { 61 | allow all; 62 | #proxy_cache_purge cache_one $host$1$is_args$args; 63 | proxy_cache_purge cache_one $host; 64 | error_page 405 =200 /purge$1; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /nginx/conf.d/ssl.conf: -------------------------------------------------------------------------------- 1 | # 2 | # HTTPS server configuration 3 | # 4 | 5 | #server { 6 | # listen 443; 7 | # server_name _; 8 | 9 | # ssl on; 10 | # ssl_certificate cert.pem; 11 | # ssl_certificate_key cert.key; 12 | 13 | # ssl_session_timeout 5m; 14 | 15 | # ssl_protocols SSLv2 SSLv3 TLSv1; 16 | # ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; 17 | # ssl_prefer_server_ciphers on; 18 | 19 | # location / { 20 | # root html; 21 | # index index.html index.htm; 22 | # } 23 | #} 24 | 25 | -------------------------------------------------------------------------------- /nginx/conf.d/virtual.conf: -------------------------------------------------------------------------------- 1 | # 2 | # A virtual host using mix of IP-, name-, and port-based configuration 3 | # 4 | 5 | #server { 6 | # listen 8000; 7 | # listen somename:8080; 8 | # server_name somename alias another.alias; 9 | 10 | # location / { 11 | # root html; 12 | # index index.html index.htm; 13 | # } 14 | #} 15 | 16 | -------------------------------------------------------------------------------- /nginx/fastcgi.conf: -------------------------------------------------------------------------------- 1 | 2 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 3 | fastcgi_param QUERY_STRING $query_string; 4 | fastcgi_param REQUEST_METHOD $request_method; 5 | fastcgi_param CONTENT_TYPE $content_type; 6 | fastcgi_param CONTENT_LENGTH $content_length; 7 | 8 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 9 | fastcgi_param REQUEST_URI $request_uri; 10 | fastcgi_param DOCUMENT_URI $document_uri; 11 | fastcgi_param DOCUMENT_ROOT $document_root; 12 | fastcgi_param SERVER_PROTOCOL $server_protocol; 13 | fastcgi_param HTTPS $https if_not_empty; 14 | 15 | fastcgi_param GATEWAY_INTERFACE CGI/1.1; 16 | fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 17 | 18 | fastcgi_param REMOTE_ADDR $remote_addr; 19 | fastcgi_param REMOTE_PORT $remote_port; 20 | fastcgi_param SERVER_ADDR $server_addr; 21 | fastcgi_param SERVER_PORT $server_port; 22 | fastcgi_param SERVER_NAME $server_name; 23 | 24 | # PHP only, required if PHP was built with --enable-force-cgi-redirect 25 | fastcgi_param REDIRECT_STATUS 200; 26 | -------------------------------------------------------------------------------- /nginx/fastcgi.conf.default: -------------------------------------------------------------------------------- 1 | 2 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 3 | fastcgi_param QUERY_STRING $query_string; 4 | fastcgi_param REQUEST_METHOD $request_method; 5 | fastcgi_param CONTENT_TYPE $content_type; 6 | fastcgi_param CONTENT_LENGTH $content_length; 7 | 8 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 9 | fastcgi_param REQUEST_URI $request_uri; 10 | fastcgi_param DOCUMENT_URI $document_uri; 11 | fastcgi_param DOCUMENT_ROOT $document_root; 12 | fastcgi_param SERVER_PROTOCOL $server_protocol; 13 | fastcgi_param HTTPS $https if_not_empty; 14 | 15 | fastcgi_param GATEWAY_INTERFACE CGI/1.1; 16 | fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 17 | 18 | fastcgi_param REMOTE_ADDR $remote_addr; 19 | fastcgi_param REMOTE_PORT $remote_port; 20 | fastcgi_param SERVER_ADDR $server_addr; 21 | fastcgi_param SERVER_PORT $server_port; 22 | fastcgi_param SERVER_NAME $server_name; 23 | 24 | # PHP only, required if PHP was built with --enable-force-cgi-redirect 25 | fastcgi_param REDIRECT_STATUS 200; 26 | -------------------------------------------------------------------------------- /nginx/fastcgi_params: -------------------------------------------------------------------------------- 1 | 2 | fastcgi_param QUERY_STRING $query_string; 3 | fastcgi_param REQUEST_METHOD $request_method; 4 | fastcgi_param CONTENT_TYPE $content_type; 5 | fastcgi_param CONTENT_LENGTH $content_length; 6 | 7 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 8 | fastcgi_param REQUEST_URI $request_uri; 9 | fastcgi_param DOCUMENT_URI $document_uri; 10 | fastcgi_param DOCUMENT_ROOT $document_root; 11 | fastcgi_param SERVER_PROTOCOL $server_protocol; 12 | fastcgi_param HTTPS $https if_not_empty; 13 | 14 | fastcgi_param GATEWAY_INTERFACE CGI/1.1; 15 | fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 16 | 17 | fastcgi_param REMOTE_ADDR $remote_addr; 18 | fastcgi_param REMOTE_PORT $remote_port; 19 | fastcgi_param SERVER_ADDR $server_addr; 20 | fastcgi_param SERVER_PORT $server_port; 21 | fastcgi_param SERVER_NAME $server_name; 22 | 23 | # PHP only, required if PHP was built with --enable-force-cgi-redirect 24 | fastcgi_param REDIRECT_STATUS 200; 25 | -------------------------------------------------------------------------------- /nginx/fastcgi_params.default: -------------------------------------------------------------------------------- 1 | 2 | fastcgi_param QUERY_STRING $query_string; 3 | fastcgi_param REQUEST_METHOD $request_method; 4 | fastcgi_param CONTENT_TYPE $content_type; 5 | fastcgi_param CONTENT_LENGTH $content_length; 6 | 7 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 8 | fastcgi_param REQUEST_URI $request_uri; 9 | fastcgi_param DOCUMENT_URI $document_uri; 10 | fastcgi_param DOCUMENT_ROOT $document_root; 11 | fastcgi_param SERVER_PROTOCOL $server_protocol; 12 | fastcgi_param HTTPS $https if_not_empty; 13 | 14 | fastcgi_param GATEWAY_INTERFACE CGI/1.1; 15 | fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; 16 | 17 | fastcgi_param REMOTE_ADDR $remote_addr; 18 | fastcgi_param REMOTE_PORT $remote_port; 19 | fastcgi_param SERVER_ADDR $server_addr; 20 | fastcgi_param SERVER_PORT $server_port; 21 | fastcgi_param SERVER_NAME $server_name; 22 | 23 | # PHP only, required if PHP was built with --enable-force-cgi-redirect 24 | fastcgi_param REDIRECT_STATUS 200; 25 | -------------------------------------------------------------------------------- /nginx/koi-utf: -------------------------------------------------------------------------------- 1 | 2 | # This map is not a full koi8-r <> utf8 map: it does not contain 3 | # box-drawing and some other characters. Besides this map contains 4 | # several koi8-u and Byelorussian letters which are not in koi8-r. 5 | # If you need a full and standard map, use contrib/unicode2nginx/koi-utf 6 | # map instead. 7 | 8 | charset_map koi8-r utf-8 { 9 | 10 | 80 E282AC ; # euro 11 | 12 | 95 E280A2 ; # bullet 13 | 14 | 9A C2A0 ; #   15 | 16 | 9E C2B7 ; # · 17 | 18 | A3 D191 ; # small yo 19 | A4 D194 ; # small Ukrainian ye 20 | 21 | A6 D196 ; # small Ukrainian i 22 | A7 D197 ; # small Ukrainian yi 23 | 24 | AD D291 ; # small Ukrainian soft g 25 | AE D19E ; # small Byelorussian short u 26 | 27 | B0 C2B0 ; # ° 28 | 29 | B3 D081 ; # capital YO 30 | B4 D084 ; # capital Ukrainian YE 31 | 32 | B6 D086 ; # capital Ukrainian I 33 | B7 D087 ; # capital Ukrainian YI 34 | 35 | B9 E28496 ; # numero sign 36 | 37 | BD D290 ; # capital Ukrainian soft G 38 | BE D18E ; # capital Byelorussian short U 39 | 40 | BF C2A9 ; # (C) 41 | 42 | C0 D18E ; # small yu 43 | C1 D0B0 ; # small a 44 | C2 D0B1 ; # small b 45 | C3 D186 ; # small ts 46 | C4 D0B4 ; # small d 47 | C5 D0B5 ; # small ye 48 | C6 D184 ; # small f 49 | C7 D0B3 ; # small g 50 | C8 D185 ; # small kh 51 | C9 D0B8 ; # small i 52 | CA D0B9 ; # small j 53 | CB D0BA ; # small k 54 | CC D0BB ; # small l 55 | CD D0BC ; # small m 56 | CE D0BD ; # small n 57 | CF D0BE ; # small o 58 | 59 | D0 D0BF ; # small p 60 | D1 D18F ; # small ya 61 | D2 D180 ; # small r 62 | D3 D181 ; # small s 63 | D4 D182 ; # small t 64 | D5 D183 ; # small u 65 | D6 D0B6 ; # small zh 66 | D7 D0B2 ; # small v 67 | D8 D18C ; # small soft sign 68 | D9 D18B ; # small y 69 | DA D0B7 ; # small z 70 | DB D188 ; # small sh 71 | DC D18D ; # small e 72 | DD D189 ; # small shch 73 | DE D187 ; # small ch 74 | DF D18A ; # small hard sign 75 | 76 | E0 D0AE ; # capital YU 77 | E1 D090 ; # capital A 78 | E2 D091 ; # capital B 79 | E3 D0A6 ; # capital TS 80 | E4 D094 ; # capital D 81 | E5 D095 ; # capital YE 82 | E6 D0A4 ; # capital F 83 | E7 D093 ; # capital G 84 | E8 D0A5 ; # capital KH 85 | E9 D098 ; # capital I 86 | EA D099 ; # capital J 87 | EB D09A ; # capital K 88 | EC D09B ; # capital L 89 | ED D09C ; # capital M 90 | EE D09D ; # capital N 91 | EF D09E ; # capital O 92 | 93 | F0 D09F ; # capital P 94 | F1 D0AF ; # capital YA 95 | F2 D0A0 ; # capital R 96 | F3 D0A1 ; # capital S 97 | F4 D0A2 ; # capital T 98 | F5 D0A3 ; # capital U 99 | F6 D096 ; # capital ZH 100 | F7 D092 ; # capital V 101 | F8 D0AC ; # capital soft sign 102 | F9 D0AB ; # capital Y 103 | FA D097 ; # capital Z 104 | FB D0A8 ; # capital SH 105 | FC D0AD ; # capital E 106 | FD D0A9 ; # capital SHCH 107 | FE D0A7 ; # capital CH 108 | FF D0AA ; # capital hard sign 109 | } 110 | -------------------------------------------------------------------------------- /nginx/koi-win: -------------------------------------------------------------------------------- 1 | 2 | charset_map koi8-r windows-1251 { 3 | 4 | 80 88 ; # euro 5 | 6 | 95 95 ; # bullet 7 | 8 | 9A A0 ; #   9 | 10 | 9E B7 ; # · 11 | 12 | A3 B8 ; # small yo 13 | A4 BA ; # small Ukrainian ye 14 | 15 | A6 B3 ; # small Ukrainian i 16 | A7 BF ; # small Ukrainian yi 17 | 18 | AD B4 ; # small Ukrainian soft g 19 | AE A2 ; # small Byelorussian short u 20 | 21 | B0 B0 ; # ° 22 | 23 | B3 A8 ; # capital YO 24 | B4 AA ; # capital Ukrainian YE 25 | 26 | B6 B2 ; # capital Ukrainian I 27 | B7 AF ; # capital Ukrainian YI 28 | 29 | B9 B9 ; # numero sign 30 | 31 | BD A5 ; # capital Ukrainian soft G 32 | BE A1 ; # capital Byelorussian short U 33 | 34 | BF A9 ; # (C) 35 | 36 | C0 FE ; # small yu 37 | C1 E0 ; # small a 38 | C2 E1 ; # small b 39 | C3 F6 ; # small ts 40 | C4 E4 ; # small d 41 | C5 E5 ; # small ye 42 | C6 F4 ; # small f 43 | C7 E3 ; # small g 44 | C8 F5 ; # small kh 45 | C9 E8 ; # small i 46 | CA E9 ; # small j 47 | CB EA ; # small k 48 | CC EB ; # small l 49 | CD EC ; # small m 50 | CE ED ; # small n 51 | CF EE ; # small o 52 | 53 | D0 EF ; # small p 54 | D1 FF ; # small ya 55 | D2 F0 ; # small r 56 | D3 F1 ; # small s 57 | D4 F2 ; # small t 58 | D5 F3 ; # small u 59 | D6 E6 ; # small zh 60 | D7 E2 ; # small v 61 | D8 FC ; # small soft sign 62 | D9 FB ; # small y 63 | DA E7 ; # small z 64 | DB F8 ; # small sh 65 | DC FD ; # small e 66 | DD F9 ; # small shch 67 | DE F7 ; # small ch 68 | DF FA ; # small hard sign 69 | 70 | E0 DE ; # capital YU 71 | E1 C0 ; # capital A 72 | E2 C1 ; # capital B 73 | E3 D6 ; # capital TS 74 | E4 C4 ; # capital D 75 | E5 C5 ; # capital YE 76 | E6 D4 ; # capital F 77 | E7 C3 ; # capital G 78 | E8 D5 ; # capital KH 79 | E9 C8 ; # capital I 80 | EA C9 ; # capital J 81 | EB CA ; # capital K 82 | EC CB ; # capital L 83 | ED CC ; # capital M 84 | EE CD ; # capital N 85 | EF CE ; # capital O 86 | 87 | F0 CF ; # capital P 88 | F1 DF ; # capital YA 89 | F2 D0 ; # capital R 90 | F3 D1 ; # capital S 91 | F4 D2 ; # capital T 92 | F5 D3 ; # capital U 93 | F6 C6 ; # capital ZH 94 | F7 C2 ; # capital V 95 | F8 DC ; # capital soft sign 96 | F9 DB ; # capital Y 97 | FA C7 ; # capital Z 98 | FB D8 ; # capital SH 99 | FC DD ; # capital E 100 | FD D9 ; # capital SHCH 101 | FE D7 ; # capital CH 102 | FF DA ; # capital hard sign 103 | } 104 | -------------------------------------------------------------------------------- /nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user www www; 2 | worker_processes 1; 3 | pid /var/run/nginx.pid; 4 | google_perftools_profiles /tmp/tcmalloc/tcmalloc; 5 | worker_rlimit_nofile 65535; 6 | 7 | events { 8 | use epoll; 9 | worker_connections 65535; 10 | } 11 | 12 | http { 13 | 14 | ## Include types 15 | include proxy_pass.conf; 16 | include mime.types; 17 | default_type application/octet-stream; 18 | 19 | ## Log Format 20 | log_format access '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" $http_x_forwarded_for' &@&$host; 21 | 22 | ## Size Limits 23 | server_names_hash_bucket_size 128; 24 | client_header_buffer_size 32k; 25 | client_body_buffer_size 128k; 26 | large_client_header_buffers 4 32k; 27 | client_max_body_size 300M; 28 | 29 | ## Timeouts 30 | keepalive_timeout 60; 31 | 32 | ## General Options 33 | server_tokens off; 34 | sendfile on; 35 | fastcgi_intercept_errors on; 36 | limit_conn_zone $binary_remote_addr zone=addr:10m; 37 | 38 | ## TCP Options 39 | tcp_nopush on; 40 | tcp_nodelay on; 41 | 42 | ## Compression 43 | gzip on; 44 | gzip_min_length 1k; 45 | gzip_buffers 4 16k; 46 | gzip_http_version 1.1; 47 | gzip_comp_level 3; 48 | gzip_types text/plain application/x-javascript text/css application/xml; 49 | gzip_vary on; 50 | 51 | ##No Header Allow 52 | server { 53 | listen 80 default; 54 | server_name _; 55 | location / { 56 | root html; 57 | return 405; 58 | } 59 | location ~ /.ht { 60 | deny all; 61 | } 62 | } 63 | 64 | include /etc/nginx/conf.d/*.conf; 65 | } 66 | -------------------------------------------------------------------------------- /nginx/nginx.conf.default: -------------------------------------------------------------------------------- 1 | 2 | #user nobody; 3 | worker_processes 1; 4 | 5 | #error_log logs/error.log; 6 | #error_log logs/error.log notice; 7 | #error_log logs/error.log info; 8 | 9 | #pid logs/nginx.pid; 10 | 11 | 12 | events { 13 | worker_connections 1024; 14 | } 15 | 16 | 17 | http { 18 | include mime.types; 19 | default_type application/octet-stream; 20 | 21 | #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 22 | # '$status $body_bytes_sent "$http_referer" ' 23 | # '"$http_user_agent" "$http_x_forwarded_for"'; 24 | 25 | #access_log logs/access.log main; 26 | 27 | sendfile on; 28 | #tcp_nopush on; 29 | 30 | #keepalive_timeout 0; 31 | keepalive_timeout 65; 32 | 33 | #gzip on; 34 | 35 | server { 36 | listen 80; 37 | server_name localhost; 38 | 39 | #charset koi8-r; 40 | 41 | #access_log logs/host.access.log main; 42 | 43 | location / { 44 | root html; 45 | index index.html index.htm; 46 | } 47 | 48 | #error_page 404 /404.html; 49 | 50 | # redirect server error pages to the static page /50x.html 51 | # 52 | error_page 500 502 503 504 /50x.html; 53 | location = /50x.html { 54 | root html; 55 | } 56 | 57 | # proxy the PHP scripts to Apache listening on 127.0.0.1:80 58 | # 59 | #location ~ \.php$ { 60 | # proxy_pass http://127.0.0.1; 61 | #} 62 | 63 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 64 | # 65 | #location ~ \.php$ { 66 | # root html; 67 | # fastcgi_pass 127.0.0.1:9000; 68 | # fastcgi_index index.php; 69 | # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; 70 | # include fastcgi_params; 71 | #} 72 | 73 | # deny access to .htaccess files, if Apache's document root 74 | # concurs with nginx's one 75 | # 76 | #location ~ /\.ht { 77 | # deny all; 78 | #} 79 | } 80 | 81 | 82 | # another virtual host using mix of IP-, name-, and port-based configuration 83 | # 84 | #server { 85 | # listen 8000; 86 | # listen somename:8080; 87 | # server_name somename alias another.alias; 88 | 89 | # location / { 90 | # root html; 91 | # index index.html index.htm; 92 | # } 93 | #} 94 | 95 | 96 | # HTTPS server 97 | # 98 | #server { 99 | # listen 443; 100 | # server_name localhost; 101 | 102 | # ssl on; 103 | # ssl_certificate cert.pem; 104 | # ssl_certificate_key cert.key; 105 | 106 | # ssl_session_timeout 5m; 107 | 108 | # ssl_protocols SSLv2 SSLv3 TLSv1; 109 | # ssl_ciphers HIGH:!aNULL:!MD5; 110 | # ssl_prefer_server_ciphers on; 111 | 112 | # location / { 113 | # root html; 114 | # index index.html index.htm; 115 | # } 116 | #} 117 | 118 | } 119 | -------------------------------------------------------------------------------- /nginx/proxy_pass.conf: -------------------------------------------------------------------------------- 1 | proxy_redirect off; 2 | proxy_set_header X-Real-IP $remote_addr; 3 | proxy_set_header REMOTE-HOST $remote_addr; 4 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 5 | proxy_set_header Accept-Encoding ''; 6 | proxy_next_upstream error timeout invalid_header http_500 http_503 http_404; 7 | 8 | proxy_temp_path /home/temp; 9 | proxy_cache_path /home/cache levels=1:2 keys_zone=cache_one:200m inactive=1d max_size=3g; 10 | 11 | proxy_cache_key "$host$uri$is_args$args"; 12 | 13 | proxy_cache_valid 200 365d; 14 | proxy_cache_valid 302 301 6h; 15 | proxy_cache_valid any 1m; 16 | 17 | #client_body_buffer_size 512k; 18 | 19 | proxy_connect_timeout 300; 20 | proxy_send_timeout 300; 21 | proxy_read_timeout 300; 22 | 23 | proxy_buffer_size 16k; 24 | proxy_buffers 4 16k; 25 | proxy_busy_buffers_size 48k; 26 | 27 | proxy_temp_file_write_size 64k; 28 | proxy_max_temp_file_size 128m; -------------------------------------------------------------------------------- /nginx/scgi_params: -------------------------------------------------------------------------------- 1 | 2 | scgi_param REQUEST_METHOD $request_method; 3 | scgi_param REQUEST_URI $request_uri; 4 | scgi_param QUERY_STRING $query_string; 5 | scgi_param CONTENT_TYPE $content_type; 6 | 7 | scgi_param DOCUMENT_URI $document_uri; 8 | scgi_param DOCUMENT_ROOT $document_root; 9 | scgi_param SCGI 1; 10 | scgi_param SERVER_PROTOCOL $server_protocol; 11 | scgi_param HTTPS $https if_not_empty; 12 | 13 | scgi_param REMOTE_ADDR $remote_addr; 14 | scgi_param REMOTE_PORT $remote_port; 15 | scgi_param SERVER_PORT $server_port; 16 | scgi_param SERVER_NAME $server_name; 17 | -------------------------------------------------------------------------------- /nginx/scgi_params.default: -------------------------------------------------------------------------------- 1 | 2 | scgi_param REQUEST_METHOD $request_method; 3 | scgi_param REQUEST_URI $request_uri; 4 | scgi_param QUERY_STRING $query_string; 5 | scgi_param CONTENT_TYPE $content_type; 6 | 7 | scgi_param DOCUMENT_URI $document_uri; 8 | scgi_param DOCUMENT_ROOT $document_root; 9 | scgi_param SCGI 1; 10 | scgi_param SERVER_PROTOCOL $server_protocol; 11 | scgi_param HTTPS $https if_not_empty; 12 | 13 | scgi_param REMOTE_ADDR $remote_addr; 14 | scgi_param REMOTE_PORT $remote_port; 15 | scgi_param SERVER_PORT $server_port; 16 | scgi_param SERVER_NAME $server_name; 17 | -------------------------------------------------------------------------------- /nginx/uwsgi_params: -------------------------------------------------------------------------------- 1 | 2 | uwsgi_param QUERY_STRING $query_string; 3 | uwsgi_param REQUEST_METHOD $request_method; 4 | uwsgi_param CONTENT_TYPE $content_type; 5 | uwsgi_param CONTENT_LENGTH $content_length; 6 | 7 | uwsgi_param REQUEST_URI $request_uri; 8 | uwsgi_param PATH_INFO $document_uri; 9 | uwsgi_param DOCUMENT_ROOT $document_root; 10 | uwsgi_param SERVER_PROTOCOL $server_protocol; 11 | uwsgi_param HTTPS $https if_not_empty; 12 | 13 | uwsgi_param REMOTE_ADDR $remote_addr; 14 | uwsgi_param REMOTE_PORT $remote_port; 15 | uwsgi_param SERVER_PORT $server_port; 16 | uwsgi_param SERVER_NAME $server_name; 17 | -------------------------------------------------------------------------------- /nginx/uwsgi_params.default: -------------------------------------------------------------------------------- 1 | 2 | uwsgi_param QUERY_STRING $query_string; 3 | uwsgi_param REQUEST_METHOD $request_method; 4 | uwsgi_param CONTENT_TYPE $content_type; 5 | uwsgi_param CONTENT_LENGTH $content_length; 6 | 7 | uwsgi_param REQUEST_URI $request_uri; 8 | uwsgi_param PATH_INFO $document_uri; 9 | uwsgi_param DOCUMENT_ROOT $document_root; 10 | uwsgi_param SERVER_PROTOCOL $server_protocol; 11 | uwsgi_param HTTPS $https if_not_empty; 12 | 13 | uwsgi_param REMOTE_ADDR $remote_addr; 14 | uwsgi_param REMOTE_PORT $remote_port; 15 | uwsgi_param SERVER_PORT $server_port; 16 | uwsgi_param SERVER_NAME $server_name; 17 | -------------------------------------------------------------------------------- /ocdn.conf: -------------------------------------------------------------------------------- 1 | Alias /ocdn /usr/local/opencdn/ocdn 2 | 3 | 4 | Order deny,allow 5 | Allow from all 6 | 7 | -------------------------------------------------------------------------------- /ocdn.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn.tar.gz -------------------------------------------------------------------------------- /ocdn/.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine on 2 | RewriteCond $1 !^(index\.php|resource) 3 | RewriteRule ^(.*)$ index.php?$1 [L] 4 | #防止其他页面报错 5 | -------------------------------------------------------------------------------- /ocdn/common.php: -------------------------------------------------------------------------------- 1 | '0123456789', 'str' => 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890'); 5 | $result = ''; 6 | $chars_length = strlen($chars[$type]) - 1; 7 | for ($i = 0; $i < $length; $i++){ 8 | if($type == 'num' && $i == 0) $result .= $chars[$type]{rand(1, $chars_length)}; 9 | else $result .= $chars[$type]{rand(0, $chars_length)}; 10 | } 11 | return $result; 12 | } 13 | 14 | function dns_a($domain){ 15 | if(is_windows()){ 16 | $url = "http://opencdn.sinaapp.com/dns.php?domain={$domain}&type=A"; 17 | $ch = curl_init(); 18 | curl_setopt($ch,CURLOPT_URL, $url); 19 | curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); 20 | $content = curl_exec($ch); 21 | curl_close($ch); 22 | return json_decode($content, true); 23 | }else return dns_get_record($domain, DNS_A); 24 | } 25 | 26 | function dns_cname($domain){ 27 | if(is_windows()){ 28 | $url = "http://opencdn.sinaapp.com/dns.php?domain={$domain}&type=CNAME"; 29 | $ch = curl_init(); 30 | curl_setopt($ch,CURLOPT_URL, $url); 31 | curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); 32 | $content = curl_exec($ch); 33 | curl_close($ch); 34 | return json_decode($content, true); 35 | }else return dns_get_record($domain, DNS_CNAME); 36 | } 37 | 38 | 39 | function is_windows(){ 40 | if(PATH_SEPARATOR ==':') return false; 41 | return true; 42 | } 43 | 44 | 45 | ?> -------------------------------------------------------------------------------- /ocdn/database.php: -------------------------------------------------------------------------------- 1 | dbObj = new PDO("mysql:host={$this->dbHost};dbname={$this->dbName};charset=UTF-8", $this->dbUser, $this->dbPass); 12 | $this->dbObj = new PDO("mysql:host={$this->dbHost};dbname={$this->dbName};charset=UTF-8", $this->dbUser, $this->dbPass, Array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES'UTF8';")); 13 | $this->dbObj->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 14 | } 15 | 16 | public function query($sql, $type = 'array'){ 17 | //$sql = $this->dbObj->quote($sql); 18 | switch($type){ 19 | case 'array': 20 | $dbObj = $this->dbObj->query($sql); 21 | if(!$dbObj) return false; 22 | $result = $dbObj->fetchAll(PDO::FETCH_ASSOC); 23 | break; 24 | case 'row': 25 | $dbObj = $this->dbObj->query($sql); 26 | if(!$dbObj) return false; 27 | $result = $dbObj->fetch(PDO::FETCH_ASSOC); 28 | break; 29 | case 'exec': 30 | $result = $this->dbObj->exec($sql); 31 | break; 32 | } 33 | if($result) return $result; 34 | else return Array(); 35 | } 36 | 37 | public function insert($table, $insertArray){ //单引号问题 38 | if(empty($insertArray)) return false; 39 | $columns = array_keys($insertArray); 40 | $values = array_values($insertArray); 41 | unset($insertArray); 42 | foreach($values as $key => $value){ 43 | if(is_bool($value)){ 44 | $value = $value ? 'true' : 'false'; 45 | } 46 | $values[$key] = $this->dbObj->quote($value); 47 | } 48 | foreach($columns as $key => $value){ 49 | $columns[$key] = $table.'.'.$value; 50 | } 51 | $columns = implode(',', $columns); 52 | $values = implode(',', $values); 53 | $query = "INSERT INTO {$table} ({$columns}) VALUES ({$values})"; 54 | return $this->dbObj->exec($query); 55 | } 56 | 57 | public function update($table, $updateArray, $where){ 58 | if(empty($updateArray) || empty($where)) return false; 59 | $updates = Array(); 60 | foreach ($updateArray as $key => $value){ 61 | if(is_bool($value)){ 62 | $value = $value ? 'true' : 'false'; 63 | } 64 | if($value != NULL){ 65 | $updates[] = $key.'='.$this->dbObj->quote($value); 66 | }else{ 67 | $updates[] = $key.'= NULL'; 68 | } 69 | } 70 | unset($updateArray); 71 | $updates = implode(',', $updates); 72 | $query = "UPDATE {$table} SET {$updates} WHERE {$where}"; 73 | return $this->dbObj->exec($query); 74 | } 75 | 76 | public function del($table, $where){ 77 | $query = "DELETE FROM $table WHERE {$where}"; 78 | //echo $query; 79 | return $this->dbObj->exec($query); 80 | } 81 | 82 | public function insertId(){ 83 | return $this->dbObj->lastInsertId(); 84 | } 85 | 86 | public function beginTransaction(){ 87 | return $this->dbObj->beginTransaction(); 88 | } 89 | 90 | public function commit(){ 91 | return $this->dbObj->commit(); 92 | } 93 | 94 | public function rollBack(){ 95 | return $this->dbObj->rollBack(); 96 | } 97 | 98 | } 99 | 100 | ?> 101 | -------------------------------------------------------------------------------- /ocdn/model/node.php: -------------------------------------------------------------------------------- 1 | $ip); 6 | $result = $this->db()->insert('node_info', $insertArray); 7 | $this->db()->update('config', array('value' => 'true'), 'name = \'restart\''); 8 | if($result === false) return false; //可能会有问题 9 | return $this->db()->insertId(); 10 | } 11 | 12 | public function nodeList($start = 0, $limit = 0, $valid = false){ 13 | if($limit == 0 && $start == 0) $limitSql = ''; 14 | else $limitSql = " LIMIT {$start},{$limit} "; 15 | if($valid) $where = " WHERE node_access = 'allow' AND Status = 'on'"; 16 | else $where = ''; 17 | $sql = "SELECT * FROM node_info {$where} {$limitSql}"; 18 | return $this->db()->query($sql, 'array'); 19 | } 20 | 21 | 22 | public function find($ip){ 23 | if(ctype_digit($ip)) $sql = "SELECT * FROM node_info WHERE node_id = '{$ip}'"; 24 | else $sql = "SELECT * FROM node_info WHERE NodeIP = '{$ip}'"; 25 | $result = $this->db()->query($sql, 'row'); 26 | return $result; 27 | } 28 | 29 | public function remove($id){ 30 | $result = $this->db()->del('node_info', "node_id = '{$id}'"); 31 | $this->db()->update('config', array('value' => 'true'), 'name = \'restart\''); 32 | return $result; 33 | } 34 | 35 | public function update($updateArray, $where){ 36 | return $this->db()->update('node_info', $updateArray, $where); 37 | } 38 | 39 | public function confUpdate($ipArray){ 40 | $dir = '../conf/opencdn.conf'; 41 | //$dir = '/etc/opencdn.conf'; 42 | if(!file_exists($dir)) return false; 43 | $file = file_get_contents($dir); 44 | $file = explode('[Node]', $file); 45 | $file = $file[0]; 46 | $file .= "[Node]\n"; 47 | foreach ($ipArray as $key => $value) { 48 | $file .= "Node{$key}={$value}\n"; 49 | } 50 | $source = fopen($dir, 'w'); 51 | fwrite($source, $file); 52 | fclose($source); 53 | return true; 54 | } 55 | 56 | 57 | } 58 | 59 | 60 | ?> -------------------------------------------------------------------------------- /ocdn/model/user.php: -------------------------------------------------------------------------------- 1 | passEncode($pass, $salt); 7 | $insertArray = array('mail' => $mail, 'salt' => $salt, 'passwd' => $passwd); 8 | $result = $this->db()->insert('user', $insertArray); 9 | if($result === false) return false; //可能会有问题 10 | return $this->db()->insertId(); 11 | } 12 | 13 | public function find($mail){ //return user_id 14 | $sql = "SELECT mail,user_id,mail_verify,passwd,salt FROM user WHERE mail = '{$mail}'"; 15 | $result = $this->db()->query($sql, 'row'); 16 | return $result; 17 | } 18 | 19 | public function get($user_id){ 20 | $sql = "SELECT * FROM user WHERE user_id = '{$user_id}'"; 21 | $result = $this->db()->query($sql, 'row'); 22 | return $result; 23 | } 24 | 25 | public function sessionCheck($callback = false){ 26 | if(empty($_SESSION['user_id'])){ 27 | if($callback) return $callback(); 28 | else exit(header('Location: ./?default')); 29 | }return $_SESSION['user_id']; 30 | } 31 | 32 | public function passEncode($pass, $salt){ 33 | return md5($salt.'?'.$salt.'='.$pass); 34 | } 35 | 36 | public function regAccess(){ 37 | $result = $this->db()->query('SELECT value FROM config WHERE name = \'reg\'', 'row'); 38 | if($result['value'] == 'true') return true; 39 | return false; 40 | } 41 | 42 | public function update($updateArray, $where){ 43 | return $this->db()->update('user', $updateArray, $where); 44 | } 45 | 46 | public function mailChange($user_id, $mail){ 47 | $token = md5(random('str', 25)); 48 | 49 | $base = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; 50 | $base = preg_replace('/\?.+$/', "?mail={$token}", $base); 51 | $content = urlencode("$base"); 52 | 53 | $url = "http://opencdn.sinaapp.com/mail.php?mail={$mail}&title=修改openCDN登陆邮箱"; 54 | $url .= "&content={$content}"; 55 | $ch = curl_init(); 56 | curl_setopt($ch,CURLOPT_URL, $url); 57 | curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); 58 | $content = curl_exec($ch); 59 | curl_close($ch); 60 | 61 | return $this->update( 62 | array('change_mail' => $mail, 'change_token' => $token), 63 | "user_id = '{$user_id}'" 64 | ); 65 | } 66 | 67 | public function mailChangeToken($token){ 68 | $sql = "SELECT user_id,change_mail FROM user WHERE change_token = '{$token}'"; 69 | $result = $this->db()->query($sql, 'row'); 70 | if(empty($result)) return false; 71 | $find = $this->find($result['change_mail']); 72 | if(!empty($find)) return false; 73 | return $this->update(array('mail' => $result['change_mail'], 'change_mail' => '', 'change_token' => ''), 74 | "user_id = '{$result['user_id']}'"); 75 | } 76 | 77 | public function passwdUpdate($user_id, $pass){ 78 | $salt = random('str', 25); 79 | $passwd = $this->passEncode($pass, $salt); 80 | $updateArray = array('salt' => $salt, 'passwd' => $passwd); 81 | return $this->update($updateArray, "user_id = '{$user_id}'"); 82 | } 83 | 84 | } 85 | 86 | 87 | ?> -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/aero_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/aero_s.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/aero_s2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/aero_s2.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_close.hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_close.hover.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_close.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_e.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_n.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_ne.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_nw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_s.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_se.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_sw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_title_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_title_icon.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/aero/ie6/aui_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/aero/ie6/aui_w.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/bg.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/bg2.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/bg_css3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/bg_css3.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/bg_css3_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/bg_css3_2.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/close.hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/close.hover.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/close.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/e.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/n.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/ne.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/nw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/s.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/se.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/sw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/black/ie6/w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/black/ie6/w.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/bg.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/bg2.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/bg_css3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/bg_css3.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/bg_css3_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/bg_css3_2.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/close.hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/close.hover.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/close.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/e.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/n.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/ne.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/nw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/s.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/se.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/sw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/blue/ie6/w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/blue/ie6/w.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/chrome/border.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/chrome/border.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/chrome/chrome_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/chrome/chrome_s.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/bg.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/bg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/bg2.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/bg_css3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/bg_css3.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/bg_css3_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/bg_css3_2.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/color_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/color_bg.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/close.hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/close.hover.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/close.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/e.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/n.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/ne.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/nw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/s.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/se.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/sw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/green/ie6/w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/green/ie6/w.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/icons/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/icons/error.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/icons/face-sad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/icons/face-sad.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/icons/face-smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/icons/face-smile.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/icons/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/icons/loading.gif -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/icons/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/icons/question.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/icons/succeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/icons/succeed.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/icons/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/icons/warning.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/idialog_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/idialog_s.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/idialog_s2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/idialog_s2.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_close.hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_close.hover.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_close.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_e.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_n.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_ne.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_nw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_s.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_se.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_sw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/idialog/ie6/aui_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/idialog/ie6/aui_w.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_close.hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_close.hover.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_close.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_e.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_n.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_n.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_ne.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_ne.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_nw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_nw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_s.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_se.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_sw.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/ie6/aui_w.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/ie6/aui_w.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/s1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/s1.png -------------------------------------------------------------------------------- /ocdn/resource/artDialog/skins/opera/s2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/artDialog/skins/opera/s2.png -------------------------------------------------------------------------------- /ocdn/resource/bootstrap/css/old_bak.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/bootstrap/css/old_bak.rar -------------------------------------------------------------------------------- /ocdn/resource/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /ocdn/resource/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/area-inverted/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 83 | 84 | 85 | 86 | 87 | 88 |
89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/area-missing/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 77 | 78 | 79 | 80 | 81 | 82 |
83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/area-negative/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 47 | 48 | 49 | 50 | 51 | 52 |
53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/area-stacked-percent/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 74 | 75 | 76 | 77 | 78 | 79 |
80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/area-stacked/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 78 | 79 | 80 | 81 | 82 | 83 |
84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/arearange/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/areaspline/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 77 | 78 | 79 | 80 | 81 | 82 |
83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/bar-basic/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 81 | 82 | 83 | 84 | 85 | 86 |
87 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/bar-negative-stack/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 79 | 80 | 81 | 82 | 83 | 84 |
85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/bar-stacked/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 59 | 60 | 61 | 62 | 63 | 64 |
65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/column-basic/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 89 | 90 | 91 | 92 | 93 | 94 |
95 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/column-negative/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 47 | 48 | 49 | 50 | 51 | 52 |
53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/column-rotated-labels/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 92 | 93 | 94 | 95 | 96 | 97 |
98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/column-stacked-and-grouped/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 71 | 72 | 73 | 74 | 75 | 76 |
77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/column-stacked-percent/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 55 | 56 | 57 | 58 | 59 | 60 |
61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/column-stacked/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 78 | 79 | 80 | 81 | 82 | 83 |
84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/columnrange/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 78 | 79 | 80 | 81 | 82 | 83 | 84 |
85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/combo-regression/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 52 | 53 | 54 | 55 | 56 | 57 |
58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/combo/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 94 | 95 | 96 | 97 | 98 | 99 |
100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/dynamic-click-to-add/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 80 | 81 | 82 | 83 | 84 | 85 |
86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/dynamic-update/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 88 | 89 | 90 | 91 | 92 | 93 |
94 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/line-ajax/analytics.tsv: -------------------------------------------------------------------------------- 1 | # ---------------------------------------- 2 | highcharts.com 3 | Daily visits 4 | September 5, 2010 October 5, 2010 5 | # ---------------------------------------- 6 | 7 | # ---------------------------------------- 8 | # Graph 9 | # ---------------------------------------- 10 | Day All Visits (Segment) New Visitors (Segment) 11 | Sunday, September 5, 2010 966 433 12 | Monday, September 6, 2010 2,475 983 13 | Tuesday, September 7, 2010 3,336 1,463 14 | Wednesday, September 8, 2010 3,211 1,316 15 | Thursday, September 9, 2010 3,229 1,351 16 | Friday, September 10, 2010 2,802 1,270 17 | Saturday, September 11, 2010 1,168 604 18 | Sunday, September 12, 2010 1,110 498 19 | Monday, September 13, 2010 3,112 1,352 20 | Tuesday, September 14, 2010 3,590 1,626 21 | Wednesday, September 15, 2010 3,529 1,549 22 | Thursday, September 16, 2010 3,519 1,574 23 | Friday, September 17, 2010 3,696 1,680 24 | Saturday, September 18, 2010 1,400 677 25 | Sunday, September 19, 2010 1,302 603 26 | Monday, September 20, 2010 3,348 1,472 27 | Tuesday, September 21, 2010 3,606 1,570 28 | Wednesday, September 22, 2010 3,320 1,438 29 | Thursday, September 23, 2010 2,677 1,140 30 | Friday, September 24, 2010 2,795 1,256 31 | Saturday, September 25, 2010 1,299 589 32 | Sunday, September 26, 2010 1,189 533 33 | Monday, September 27, 2010 3,189 1,253 34 | Tuesday, September 28, 2010 3,223 1,266 35 | Wednesday, September 29, 2010 3,231 1,249 36 | Thursday, September 30, 2010 3,608 1,684 37 | Friday, October 1, 2010 2,945 1,185 38 | Saturday, October 2, 2010 1,058 460 39 | Sunday, October 3, 2010 1,114 499 40 | Monday, October 4, 2010 2,774 1,131 41 | Tuesday, October 5, 2010 2,679 1,047 42 | 43 | # ---------------------------------------- 44 | # Table 45 | # ---------------------------------------- 46 | Day Visits New Visits 47 | Friday, September 17, 2010 48 | All Visits 3696 1680 49 | New Visitors 1680 1680 50 | % of Total 0.45454545454545453 1.0 51 | Thursday, September 30, 2010 52 | All Visits 3608 1684 53 | New Visitors 1684 1684 54 | % of Total 0.46674057649667405 1.0 55 | Tuesday, September 21, 2010 56 | All Visits 3606 1570 57 | New Visitors 1570 1570 58 | % of Total 0.4353854686633389 1.0 59 | Tuesday, September 14, 2010 60 | All Visits 3590 1626 61 | New Visitors 1626 1626 62 | % of Total 0.452924791086351 1.0 63 | Wednesday, September 15, 2010 64 | All Visits 3529 1549 65 | New Visitors 1549 1549 66 | % of Total 0.4389345423632757 1.0 67 | Thursday, September 16, 2010 68 | All Visits 3519 1574 69 | New Visitors 1574 1574 70 | % of Total 0.44728616084114803 1.0 71 | Monday, September 20, 2010 72 | All Visits 3348 1472 73 | New Visitors 1472 1472 74 | % of Total 0.43966547192353644 1.0 75 | Tuesday, September 7, 2010 76 | All Visits 3336 1463 77 | New Visitors 1463 1463 78 | % of Total 0.4385491606714628 1.0 79 | Wednesday, September 22, 2010 80 | All Visits 3320 1438 81 | New Visitors 1438 1438 82 | % of Total 0.4331325301204819 1.0 83 | Wednesday, September 29, 2010 84 | All Visits 3231 1249 85 | New Visitors 1249 1249 86 | % of Total 0.3865676261219437 1.0 87 | # -------------------------------------------------------------------------------- 88 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/line-basic/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 73 | 74 | 75 | 76 | 77 | 78 |
79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/line-labels/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 58 | 59 | 60 | 61 | 62 | 63 |
64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/line-log-axis/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 45 | 46 | 47 | 48 | 49 | 50 |
51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/pie-basic/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 62 | 63 | 64 | 65 | 66 | 67 |
68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/pie-gradient/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 75 | 76 | 77 | 78 | 79 | 80 |
81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/pie-legend/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 61 | 62 | 63 | 64 | 65 | 66 |
67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/polar-spider/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 66 | 67 | 68 | 69 | 70 | 71 | 72 |
73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/polar/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 70 | 71 | 72 | 73 | 74 | 75 | 76 |
77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/spline-inverted/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 79 | 80 | 81 | 82 | 83 | 84 |
85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/examples/spline-symbols/index.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Highcharts Example 6 | 7 | 8 | 79 | 80 | 81 | 82 | 83 | 84 |
85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/java/highcharts-export/src/main/java/com/highcharts/export/filters/DefaultEncodingFilter.java: -------------------------------------------------------------------------------- 1 | /* Inspired by: 2 | * Copyright 2004 The Apache Software Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.highcharts.export.filters; 18 | 19 | import java.io.IOException; 20 | 21 | import javax.servlet.Filter; 22 | import javax.servlet.FilterChain; 23 | import javax.servlet.FilterConfig; 24 | import javax.servlet.ServletException; 25 | import javax.servlet.ServletRequest; 26 | import javax.servlet.ServletResponse; 27 | 28 | //import org.apache.log4j.Logger; 29 | 30 | public class DefaultEncodingFilter implements Filter { 31 | 32 | protected String encoding = null; 33 | protected boolean ignore = true; 34 | //private Logger logger= Logger.getLogger(this.getClass().getName()); 35 | 36 | @Override 37 | public void destroy() { 38 | this.encoding = null; 39 | } 40 | 41 | @Override 42 | public void doFilter(ServletRequest request, ServletResponse response, 43 | FilterChain chain) throws IOException, ServletException { 44 | 45 | // Conditionally select and set the character encoding to be used 46 | if (ignore || (request.getCharacterEncoding() == null)) { 47 | String encoding = selectEncoding(request); 48 | if (encoding != null){ 49 | request.setCharacterEncoding(encoding); 50 | } 51 | } 52 | 53 | // Pass control on to the next filter 54 | chain.doFilter(request, response); 55 | 56 | } 57 | 58 | @Override 59 | public void init(FilterConfig config) throws ServletException { 60 | 61 | this.encoding = config.getInitParameter("encoding"); 62 | 63 | String value = config.getInitParameter("ignore"); 64 | if (value == null) 65 | this.ignore = true; 66 | else if (value.equalsIgnoreCase("true")) 67 | this.ignore = true; 68 | else if (value.equalsIgnoreCase("yes")) 69 | this.ignore = true; 70 | else 71 | this.ignore = false; 72 | 73 | } 74 | 75 | protected String selectEncoding(ServletRequest request) { 76 | return (this.encoding); 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/java/highcharts-export/src/main/java/com/highcharts/export/util/MimeType.java: -------------------------------------------------------------------------------- 1 | package com.highcharts.export.util; 2 | 3 | import java.util.EnumSet; 4 | import java.util.HashMap; 5 | import java.util.Map; 6 | 7 | public enum MimeType 8 | { 9 | PNG("image/png"), 10 | JPEG("image/jpeg"), 11 | PDF("application/pdf"), 12 | SVG("image/svg+xml"); 13 | 14 | private static final Map lookup 15 | = new HashMap(); 16 | 17 | static { 18 | for(MimeType m : EnumSet.allOf(MimeType.class)) 19 | lookup.put(m.getType(), m); 20 | } 21 | 22 | private String type; 23 | 24 | private MimeType(String type) { 25 | this.type = type; 26 | } 27 | 28 | public String getType() { return type; } 29 | 30 | public static MimeType get(String type) { 31 | 32 | return lookup.get(type); 33 | } 34 | } -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/java/highcharts-export/src/main/java/com/highcharts/export/util/SVGRasterizer.java: -------------------------------------------------------------------------------- 1 | package com.highcharts.export.util; 2 | 3 | import java.io.ByteArrayOutputStream; 4 | import java.io.StringReader; 5 | 6 | import org.apache.batik.transcoder.SVGAbstractTranscoder; 7 | import org.apache.batik.transcoder.TranscoderException; 8 | import org.apache.batik.transcoder.TranscoderInput; 9 | import org.apache.batik.transcoder.TranscoderOutput; 10 | import org.apache.batik.transcoder.image.JPEGTranscoder; 11 | import org.apache.batik.transcoder.image.PNGTranscoder; 12 | import org.apache.fop.svg.PDFTranscoder; 13 | 14 | public class SVGRasterizer { 15 | 16 | private static final SVGRasterizer INSTANCE = new SVGRasterizer(); 17 | 18 | public static final SVGRasterizer getInstance() { 19 | return INSTANCE; 20 | } 21 | 22 | private SVGRasterizer() { 23 | } 24 | 25 | public synchronized ByteArrayOutputStream transcode( 26 | ByteArrayOutputStream stream, String svg, MimeType mime, Float width) 27 | throws SVGRasterizerException, TranscoderException { 28 | 29 | TranscoderInput input = new TranscoderInput(new StringReader(svg)); 30 | // Create the transcoder output 31 | TranscoderOutput transOutput = new TranscoderOutput(stream); 32 | // get right Transcoder, depends on mime 33 | SVGAbstractTranscoder transcoder = SVGRasterizer.getTranscoder(mime); 34 | if (width != null) { 35 | /* 36 | * If the raster image height is not provided (using the 37 | * KEY_HEIGHT), the transcoder will compute the raster image height 38 | * by keeping the aspect ratio of the SVG document. 39 | */ 40 | transcoder.addTranscodingHint(SVGAbstractTranscoder.KEY_WIDTH, 41 | width); 42 | } 43 | transcoder.transcode(input, transOutput); 44 | 45 | return stream; 46 | 47 | } 48 | 49 | public static SVGAbstractTranscoder getTranscoder(MimeType mime) 50 | throws SVGRasterizerException { 51 | 52 | SVGAbstractTranscoder transcoder = null; 53 | 54 | switch (mime) { 55 | case PNG: 56 | transcoder = new PNGTranscoder(); 57 | break; 58 | case JPEG: 59 | transcoder = new JPEGTranscoder(); 60 | transcoder.addTranscodingHint(JPEGTranscoder.KEY_QUALITY, 61 | new Float(0.9)); 62 | break; 63 | case PDF: 64 | transcoder = new PDFTranscoder(); 65 | break; 66 | default: 67 | // do nothing 68 | break; 69 | } 70 | 71 | if(transcoder == null){ 72 | throw new SVGRasterizerException("MimeType not supported"); 73 | } 74 | 75 | return transcoder; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/java/highcharts-export/src/main/java/com/highcharts/export/util/SVGRasterizerException.java: -------------------------------------------------------------------------------- 1 | package com.highcharts.export.util; 2 | 3 | public class SVGRasterizerException extends Exception { 4 | 5 | private static final long serialVersionUID = -5110552374074051446L; 6 | private String mistake; 7 | 8 | public SVGRasterizerException() { 9 | super(); 10 | mistake = "unknown to men"; 11 | } 12 | 13 | public SVGRasterizerException(String err) { 14 | super(err); // call super class constructor 15 | mistake = err; // save message 16 | } 17 | 18 | public String getError() { 19 | return mistake; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/java/highcharts-export/src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | # Direct log messages to a log file 2 | log4j.appender.file=org.apache.log4j.RollingFileAppender 3 | log4j.appender.file.File=${catalina.base}/logs/export.log 4 | log4j.appender.file.MaxFileSize=1MB 5 | log4j.appender.file.MaxBackupIndex=1 6 | log4j.appender.file.layout=org.apache.log4j.PatternLayout 7 | log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n 8 | 9 | # Direct log messages to stdout 10 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 11 | log4j.appender.stdout.Target=System.out 12 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 13 | log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n 14 | 15 | log4j.logger.exportservlet=ERROR 16 | # Root logger option 17 | log4j.rootLogger=ERROR, file, stdout -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/java/highcharts-export/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | encodingFilter 8 | com.highcharts.export.filters.DefaultEncodingFilter 9 | 10 | encoding 11 | utf-8 12 | 13 | 14 | ignore 15 | true 16 | 17 | 18 | 19 | encodingFilter 20 | /* 21 | 22 | 23 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/java/install.txt: -------------------------------------------------------------------------------- 1 | 1. First, download Maven (http://maven.apache.org/download.html) and follow the installation instructions (http://maven.apache.org/download.html#Installation). 2 | 3 | 2. After that, type the following in a terminal or in a command prompt: mvn clean package 4 | 5 | 3. Now you have a highcharts-export.war file which you can upload/copy to your application server. 6 | 7 | 4. Change you url configuration in the exporting option, that it is pointing to your new installed exporting-server. 8 | exporting:{ 9 | url:'http://new.server.com/highcharts-export' 10 | } 11 | 5. When using this application in a non SUN-java environment, it's necessary to change the propertie-files in: .m2/repository/org/apache/xmlgraphics/batik-codec/1.7/batik-codec.jar/META-INF/services 12 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/phantomjs/readme.md: -------------------------------------------------------------------------------- 1 | #The Highcharts image convert script# 2 | The file highcharts-convert.js is a [PhantomJS](http://phantomjs.org/) script to convert SVG or Highcharts JSON options objects to chart images. It is ideal for batch processing Highcharts configurations for attaching to emails or reports. It is also used in the featured export server, where it is referenced by a PHP file. An online demo with a GUI can be viewed at [export.highcharts.com/demo.php](http://export.highcharts.com/demo.php). 3 | 4 | #Example usage# 5 | phantomjs highcharts-convert.js -infile options1.json -outfile chart1.png -scale 2.5 -width 300 -constr Chart -callback callback.js 6 | 7 | #Description of command line parameters# 8 | 9 | **-infile:** The file to convert, assumes it's either a JSON file, the script checks for the input file to have the extension '.json', or otherwise it assumes it to be an svg file. 10 | 11 | **-outfile:** The file to output. Must be a filename with the extension .jpg, .png .pdf or .svg. 12 | 13 | **-scale:** To set the zoomFactor of the page rendered by PhantomJs. For example, if the _chart.width_ option in the chart configuration is set to 600 and the scale is set to 2, the output raster image will have a pixel width of 1200. So this is a convenient way of increasing the resolution without decreasing the font size and line widths in the chart. This is ignored if the _-width_ parameter is set. 14 | 15 | **-width:** Set the exact pixel width of the exported image or pdf. This overrides the _-scale_ parameter. 16 | 17 | **-constr:** The constructor name. Can be one of _Chart_ or _StockChart_. This depends on whether you want to generate Highstock or basic Highcharts. 18 | 19 | **-callback:** Filename of the _callback_. The _callback_ is a function which will be called in the constructor of Highcharts to be executed on chart load. All code of the callback must be enclosed by a function. See this example of contents of the callback file: 20 | 21 | function(chart) { 22 | chart.renderer.arc(200, 150, 100, 50, -Math.PI, 0).attr({ 23 | fill : '#FCFFC5', 24 | stroke : 'black', 25 | 'stroke-width' : 1 26 | }).add(); 27 | } 28 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/php/php-batik/index-with-imagick.php: -------------------------------------------------------------------------------- 1 | $output"; 77 | echo "Error while converting SVG. "; 78 | 79 | if (strpos($output, 'SVGConverter.error.while.rasterizing.file') !== false) { 80 | echo " 81 |

Debug steps

82 |
    83 |
  1. Copy the SVG:
  2. 84 |
  3. Go to validator.w3.org/#validate_by_input
  4. 85 |
  5. Paste the SVG
  6. 86 |
  7. Click More Options and select SVG 1.1 for Use Doctype
  8. 87 |
  9. Click the Check button
  10. 88 |
"; 89 | } 90 | } 91 | 92 | // stream it 93 | else { 94 | header("Content-Disposition: attachment; filename=\"$filename.$ext\""); 95 | header("Content-Type: $type"); 96 | echo file_get_contents($outfile); 97 | } 98 | 99 | // delete it 100 | unlink("temp/$tempName.svg"); 101 | unlink($outfile); 102 | 103 | // SVG can be streamed directly back 104 | } else if ($ext == 'svg') { 105 | header("Content-Disposition: attachment; filename=\"$filename.$ext\""); 106 | header("Content-Type: $type"); 107 | echo $svg; 108 | 109 | } else { 110 | echo "Invalid type"; 111 | } 112 | ?> 113 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/php/php-batik/index.php: -------------------------------------------------------------------------------- 1 | $output"; 77 | echo "Error while converting SVG. "; 78 | 79 | if (strpos($output, 'SVGConverter.error.while.rasterizing.file') !== false) { 80 | echo " 81 |

Debug steps

82 |
    83 |
  1. Copy the SVG:
  2. 84 |
  3. Go to validator.w3.org/#validate_by_input
  4. 85 |
  5. Paste the SVG
  6. 86 |
  7. Click More Options and select SVG 1.1 for Use Doctype
  8. 87 |
  9. Click the Check button
  10. 88 |
"; 89 | } 90 | } 91 | 92 | // stream it 93 | else { 94 | header("Content-Disposition: attachment; filename=\"$filename.$ext\""); 95 | header("Content-Type: $type"); 96 | echo file_get_contents($outfile); 97 | } 98 | 99 | // delete it 100 | unlink("temp/$tempName.svg"); 101 | unlink($outfile); 102 | 103 | // SVG can be streamed directly back 104 | } else if ($ext == 'svg') { 105 | header("Content-Disposition: attachment; filename=\"$filename.$ext\""); 106 | header("Content-Type: $type"); 107 | echo $svg; 108 | 109 | } else { 110 | echo "Invalid type"; 111 | } 112 | ?> 113 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/php/php-phantomjs/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | PHP-phantomjs 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.wst.jsdt.core.jsNature 16 | 17 | 18 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/php/php-phantomjs/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/php/php-phantomjs/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/php/php-phantomjs/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /ocdn/resource/highcharts/exporting-server/php/php-phantomjs/readme.md: -------------------------------------------------------------------------------- 1 | Locate these lines in index.php 2 | define ('PHANTOMJS_PATH', '/usr/local/bin/phantomjs'); 3 | define ("PHANTOMJS_SCRIPT", 'highcharts-convert.js'); 4 | 5 | 1. specify in index.php location of phantom: f.eks. /usr/local/highcharts-convert.js 6 | 2. specify in index.php location of the phantom script: highcharts-convert.js 7 | 8 | Open highcharts-convert.js script and locate the config object 9 | 10 | var config = { 11 | /* define locations of mandatory javascript files */ 12 | HIGHCHARTS: 'highcharts.js', 13 | HIGHCHARTS_MORE: 'highcharts-more', 14 | JQUERY: 'jquery-1.8.2.min.js' 15 | }, 16 | 3. specify in the above config object the location of highcharts.js, jquery and evt. highcharts-more.js file. Point to these files relative from the highcharts-convert.js file. 17 | 18 | 19 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/gfx/vml-radial-gradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/highcharts/gfx/vml-radial-gradient.png -------------------------------------------------------------------------------- /ocdn/resource/highcharts/graphics/skies.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/highcharts/graphics/skies.jpg -------------------------------------------------------------------------------- /ocdn/resource/highcharts/graphics/snow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/highcharts/graphics/snow.png -------------------------------------------------------------------------------- /ocdn/resource/highcharts/graphics/sun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/ocdn/resource/highcharts/graphics/sun.png -------------------------------------------------------------------------------- /ocdn/resource/highcharts/js/adapters/mootools-adapter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Highcharts JS v2.3.5 (2012-12-19) 3 | MooTools adapter 4 | 5 | (c) 2010-2011 Torstein Hønsi 6 | 7 | License: www.highcharts.com/license 8 | */ 9 | (function(){var e=window,i=document,f=e.MooTools.version.substring(0,3),g=f==="1.2"||f==="1.1",j=g||f==="1.3",h=e.$extend||function(){return Object.append.apply(Object,arguments)};e.HighchartsAdapter={init:function(a){var b=Fx.prototype,c=b.start,d=Fx.Morph.prototype,e=d.compute;b.start=function(b,d){var e=this.element;if(b.d)this.paths=a.init(e,e.d,this.toD);c.apply(this,arguments);return this};d.compute=function(b,c,d){var f=this.paths;if(f)this.element.attr("d",a.step(f[0],f[1],d,this.toD));else return e.apply(this, 10 | arguments)}},adapterRun:function(a,b){if(b==="width"||b==="height")return parseInt($(a).getStyle(b),10)},getScript:function(a,b){var c=i.getElementsByTagName("head")[0],d=i.createElement("script");d.type="text/javascript";d.src=a;d.onload=b;c.appendChild(d)},animate:function(a,b,c){var d=a.attr,f=c&&c.complete;if(d&&!a.setStyle)a.getStyle=a.attr,a.setStyle=function(){var a=arguments;this.attr.call(this,a[0],a[1][0])},a.$family=function(){return!0};e.HighchartsAdapter.stop(a);c=new Fx.Morph(d?a:$(a), 11 | h({transition:Fx.Transitions.Quad.easeInOut},c));if(d)c.element=a;if(b.d)c.toD=b.d;f&&c.addEvent("complete",f);c.start(b);a.fx=c},each:function(a,b){return g?$each(a,b):Array.each(a,b)},map:function(a,b){return a.map(b)},grep:function(a,b){return a.filter(b)},inArray:function(a,b,c){return b.indexOf(a,c)},merge:function(){var a=arguments,b=[{}],c=a.length;if(g)a=$merge.apply(null,a);else{for(;c--;)typeof a[c]!=="boolean"&&(b[c+1]=a[c]);a=Object.merge.apply(Object,b)}return a},offset:function(a){a= 12 | $(a).getOffsets();return{left:a.x,top:a.y}},extendWithEvents:function(a){a.addEvent||(a.nodeName?$(a):h(a,new Events))},addEvent:function(a,b,c){typeof b==="string"&&(b==="unload"&&(b="beforeunload"),e.HighchartsAdapter.extendWithEvents(a),a.addEvent(b,c))},removeEvent:function(a,b,c){typeof a!=="string"&&a.addEvent&&(b?(b==="unload"&&(b="beforeunload"),c?a.removeEvent(b,c):a.removeEvents&&a.removeEvents(b)):a.removeEvents())},fireEvent:function(a,b,c,d){b={type:b,target:a};b=j?new Event(b):new DOMEvent(b); 13 | b=h(b,c);b.preventDefault=function(){d=null};a.fireEvent&&a.fireEvent(b.type,b);d&&d(b)},washMouseEvent:function(a){return a.event||a},stop:function(a){a.fx&&a.fx.cancel()}}})(); 14 | -------------------------------------------------------------------------------- /ocdn/resource/highcharts/js/adapters/prototype-adapter.js: -------------------------------------------------------------------------------- 1 | /* 2 | Highcharts JS v2.3.5 (2012-12-19) 3 | Prototype adapter 4 | 5 | @author Michael Nelson, Torstein Hønsi. 6 | 7 | Feel free to use and modify this script. 8 | Highcharts license: www.highcharts.com/license. 9 | */ 10 | var HighchartsAdapter=function(){var g=typeof Effect!=="undefined";return{init:function(c){if(g)Effect.HighchartsTransition=Class.create(Effect.Base,{initialize:function(a,b,d,e){var f;this.element=a;this.key=b;f=a.attr?a.attr(b):$(a).getStyle(b);if(b==="d")this.paths=c.init(a,a.d,d),this.toD=d,f=0,d=1;this.start(Object.extend(e||{},{from:f,to:d,attribute:b}))},setup:function(){HighchartsAdapter._extend(this.element);if(!this.element._highchart_animation)this.element._highchart_animation={};this.element._highchart_animation[this.key]= 11 | this},update:function(a){var b=this.paths,d=this.element;b&&(a=c.step(b[0],b[1],a,this.toD));d.attr?d.attr(this.options.attribute,a):(b={},b[this.options.attribute]=a,$(d).setStyle(b))},finish:function(){delete this.element._highchart_animation[this.key]}})},adapterRun:function(c,a){return parseInt($(c).getStyle(a),10)},getScript:function(c,a){var b=$$("head")[0];b&&b.appendChild((new Element("script",{type:"text/javascript",src:c})).observe("load",a))},addNS:function(c){var a=/^(?:click|mouse(?:down|up|over|move|out))$/; 12 | return/^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/.test(c)||a.test(c)?c:"h:"+c},addEvent:function(c,a,b){c.addEventListener||c.attachEvent?Event.observe($(c),HighchartsAdapter.addNS(a),b):(HighchartsAdapter._extend(c),c._highcharts_observe(a,b))},animate:function(c,a,b){var d,b=b||{};b.delay=0;b.duration=(b.duration||500)/1E3;b.afterFinish=b.complete;if(g)for(d in a)new Effect.HighchartsTransition($(c),d,a[d],b);else{if(c.attr)for(d in a)c.attr(d,a[d]);b.complete&& 13 | b.complete()}c.attr||$(c).setStyle(a)},stop:function(c){var a;if(c._highcharts_extended&&c._highchart_animation)for(a in c._highchart_animation)c._highchart_animation[a].cancel()},each:function(c,a){$A(c).each(a)},inArray:function(c,a){return a.indexOf(c)},offset:function(c){return $(c).cumulativeOffset()},fireEvent:function(c,a,b,d){c.fire?c.fire(HighchartsAdapter.addNS(a),b):c._highcharts_extended&&(b=b||{},c._highcharts_fire(a,b));b&&b.defaultPrevented&&(d=null);d&&d(b)},removeEvent:function(c, 14 | a,b){$(c).stopObserving&&(a&&(a=HighchartsAdapter.addNS(a)),$(c).stopObserving(a,b));window===c?Event.stopObserving(c,a,b):(HighchartsAdapter._extend(c),c._highcharts_stop_observing(a,b))},washMouseEvent:function(c){return c},grep:function(c,a){return c.findAll(a)},map:function(c,a){return c.map(a)},merge:function(){function c(a,b){var d,e;for(e in b)d=b[e],a[e]=d&&typeof d==="object"&&d.constructor!==Array&&typeof d.nodeType!=="number"?c(a[e]||{},d):b[e];return a}return function(){var a=arguments, 15 | b,d={};for(b=0;b=c&&k<=g){var e=b.split(a.itemDelimiter||",");l(e,function(a,b){b>=f&&b<=j&&(d[b-f]||(d[b-f]=[]),d[b-f][k-c]=a)})}}),this.dataFound())},parseTable:function(){var a=this.options,b=a.table,d=this.columns,c=a.startRow||0,g=a.endRow||Number.MAX_VALUE,f=a.startColumn||0,j=a.endColumn||Number.MAX_VALUE,i;b&&(typeof b==="string"&&(b=document.getElementById(b)),l(b.getElementsByTagName("tr"),function(a,b){i= 10 | 0;b>=c&&b<=g&&l(a.childNodes,function(a){if((a.tagName==="TD"||a.tagName==="TH")&&i>=f&&i<=j)d[i]||(d[i]=[]),d[i][b-c]=a.innerHTML,i+=1})}),this.dataFound())},parseGoogleSpreadsheet:function(){var a=this,b=this.options,d=b.googleSpreadsheetKey,c=this.columns;d&&jQuery.getJSON("https://spreadsheets.google.com/feeds/cells/"+d+"/"+(b.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",function(b){var b=b.feed.entry,d,j=b.length,i=0,k=0,e;for(e=0;e31536E6?a[b].isDatetime=!0:a[b].isNumeric= 12 | !0):(c=this.parseDate(c),b===0&&typeof c==="number"&&!isNaN(c)?(a[b][d]=c,a[b].isDatetime=!0):a[b][d]=f)},dateFormats:{"YYYY-mm-dd":{regex:"^([0-9]{4})-([0-9]{2})-([0-9]{2})$",parser:function(a){return Date.UTC(+a[1],a[2]-1,+a[3])}}},parseDate:function(a){var b=this.options.parseDate,d,c,g;b&&(d=b);if(typeof a==="string")for(c in this.dateFormats)b=this.dateFormats[c],(g=a.match(b.regex))&&(d=b.parser(g));return d},rowsToColumns:function(a){var b,d,c,g,f;if(a){f=[];d=a.length;for(b=0;b1&&(c=a.shift(),this.headerRow===0&&c.shift(),(b=c.isNumeric||c.isDatetime)||(d=c),c.isDatetime&&(g="datetime"));j=[];for(e=0;e 2 | 3 | 4 | 5 | OpenCDN 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 27 | 28 | 29 | 30 | 33 | 34 | 35 |

OpenCDN

36 |
37 |
38 |
39 |
40 | 41 | 42 |
43 |
44 |
45 |
46 |
47 |
48 | 49 | 50 |
51 |
52 |
53 |
54 |
55 | 登陆 56 |
57 |
58 |
59 |
60 | 注册 61 |
62 |
63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /ocdn/view/domainSet.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | 缓存配置 6 |
7 | 8 |
9 | 13 |
14 |
15 |
16 | 17 |
18 | 19 | 目录:/xxx 文件类型:jsp|php|asp 20 |
21 |
22 |
23 | 24 |
25 | 29 | 天 30 |
31 |
32 |
33 | 34 |
35 | 36 |
37 |
38 |
39 | 40 |
41 | 42 | 43 |
44 |
45 |
46 | 添加 47 |
48 |
49 |
50 |
51 |
52 |
53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | $value) { ?> 66 | 67 | 68 | 77 | 82 | 85 | 88 | 93 | 94 | 95 | 96 |
匹配规则匹配类型缓存权重备注操作
69 | 70 | 目录 71 | 72 | 文件类型 73 | 74 | 正则 75 | 76 | 78 | 79 | 否 80 | 81 | 83 | 84 | 86 | 87 | 89 | 90 | 91 | 92 |
97 |
98 |
99 |
100 | -------------------------------------------------------------------------------- /ocdn/view/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ocdn/view/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | OpenCDN 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /ocdn/view/node.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 |
5 |
6 | 节点 7 | 8 | 添加 9 |
10 | 现测试阶段节点请少于8个,否则会导致CNAME功能异常 11 |
12 |
13 | 14 |
15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | > 33 | 37 | 38 | 46 | 56 | 57 | 58 | 59 |
节点名称IP地址状态操作
34 | '.$value['node_name'].' 修改'; ?> 35 | 取消'; ?> 36 | 39 | 45 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
60 |
61 |
62 |
63 | -------------------------------------------------------------------------------- /ocdn/view/purge.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | 缓存清除 5 | 6 | fsockopen函数不可用,无法正常清除缓存
7 | 8 | 在下面输入要清除的地址,如果有多个地址,每个url一行
9 | 例如:/images/logo.gif 或 http://ocnd.me/images/logo.gif

10 | 11 | 12 | 13 | 开始清除 14 | 停止 15 |
16 |
17 |
18 |
19 | 清除结果:
20 |
21 |
22 |
23 | -------------------------------------------------------------------------------- /ocdn/view/reg.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | OpenCdn 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 27 | 28 | 29 | 30 | 33 | 34 | 35 |

OpenCDN

36 |
37 |
38 |
39 |
40 | 41 | 42 |
43 |
44 |
45 |
46 |
47 |
48 | 49 | 50 |
51 |
52 |
53 |
54 |
55 | 注册 56 |
57 |
58 |
59 |
60 | 返回 61 |
62 |
63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /opencdn: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #description: opencdn 4 | #chkconfig: 2345 20 81 5 | 6 | OPENCDN_LOG_PATH="/var/log/opencdn" 7 | OPENCDN_EXEC_PATH="/usr/local/opencdn/sbin" 8 | EXEC="opencdn" 9 | EXEC_INFO="read_info" 10 | EXEC_LOG="do_accesslog" 11 | EXEC_TASK="syn_node" 12 | EXEC_RSYNC="rsync_send" 13 | EXEC_ICMP="icmp" 14 | PID_FILE="/var/run/$EXEC.pid" 15 | 16 | 17 | . /etc/rc.d/init.d/functions 18 | 19 | [ -x ${OPENCDN_EXEC_PATH}/${EXEC_RSYNC} ] || echo "ERROR: $EXEC_RSYNC not found" 20 | [ -x ${OPENCDN_EXEC_PATH}/$EXEC_INFO ] || echo "ERROR: $EXEC_INFO not found" 21 | [ -x ${OPENCDN_EXEC_PATH}/$EXEC_LOG ] || echo "ERROR: $EXEC_LOG not found" 22 | [ -x ${OPENCDN_EXEC_PATH}/$EXEC_TASK ] || echo "ERROR: $EXEC_TASK not found" 23 | [ -f "$PID_FILE" ] || touch $PID_FILE 24 | 25 | stop() 26 | { 27 | echo "Stoping $EXEC ..." 28 | ps aux | grep "$EXEC_INFO" | kill -9 `awk '{print $2}'` >/dev/null 2>&1 29 | ps aux | grep "$EXEC_LOG" | kill -9 `awk '{print $2}'` >/dev/null 2>&1 30 | ps aux | grep "$EXEC_TASK" | kill -9 `awk '{print $2}'` >/dev/null 2>&1 31 | ps aux | grep "$EXEC_ICMP" | kill -9 `awk '{print $2}'` >/dev/null 2>&1 32 | 33 | #kill rsync and inotify 34 | kill -9 `ps aux | grep inotify | awk '{print $2}'` > /dev/null 2>&1 35 | kill -9 `ps aux | grep 'rsync_send' | awk '{print $2}'` > /dev/null 2>&1 36 | 37 | service syslog-ng stop 38 | echo "" > $PID_FILE 39 | usleep 100 40 | echo -e "Shutting down $EXEC: \033[41;37m [ OK ] \033[0m" 41 | } 42 | 43 | start() 44 | { 45 | if [ "`cat $PID_FILE `" == "running" ] 46 | then 47 | echo -e "\033[41;37m ERROR \033[0m : $EXEC is running" 48 | exit 1 49 | fi 50 | echo "Starting $EXEC ..." 51 | nohup /bin/bash ${OPENCDN_EXEC_PATH}/read_info >> ${OPENCDN_LOG_PATH}/read_info.log 2>&1 & 52 | nohup /bin/bash ${OPENCDN_EXEC_PATH}/do_accesslog >> ${OPENCDN_LOG_PATH}/do_accesslog.log 2>&1 & 53 | nohup /bin/bash ${OPENCDN_EXEC_PATH}/rsync_send >> ${OPENCDN_LOG_PATH}/rsync-send.log 2>&1 & 54 | nohup python ${OPENCDN_EXEC_PATH}/icmp >> ${OPENCDN_LOG_PATH}/node_health.log 2>&1 & 55 | 56 | service syslog-ng start 57 | echo "running" > $PID_FILE 58 | usleep 100 59 | echo -e "Starting $EXEC: \033[41;37m [ OK ] \033[0m" 60 | } 61 | 62 | status() 63 | { 64 | if [ "`cat $PID_FILE`" == "running" ] 65 | then 66 | echo "$EXEC is running" 67 | else 68 | echo "$EXEC is not running" 69 | fi 70 | } 71 | 72 | restart() 73 | { 74 | stop 75 | start 76 | } 77 | 78 | case "$1" in 79 | start) 80 | start 81 | ;; 82 | stop) 83 | stop 84 | ;; 85 | restart) 86 | restart 87 | ;; 88 | status) 89 | status 90 | ;; 91 | *) 92 | echo "Usage: service $EXEC {start|stop|restart|status}" 93 | exit 1 94 | esac 95 | 96 | exit $? 97 | -------------------------------------------------------------------------------- /opencdn.conf: -------------------------------------------------------------------------------- 1 | #opencdn configure file 2 | 3 | #DB_UserPort=3306 4 | 5 | # mysql basic configure file 6 | [root] 7 | DB_PORT=3306 8 | DB_Host=localhost 9 | DB_UserName=root 10 | DB_PassWord=DP 11 | 12 | # notice : can not change 13 | [logs] 14 | Mysql_Logs_Host=localhost 15 | Mysql_Logs_DBName=cdn_info 16 | Mysql_Logs_TableName=node_info 17 | 18 | # add node ip 19 | [Node] 20 | -------------------------------------------------------------------------------- /read_info: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #author : firefoxbug 3 | # 4 | #nohup /bin/bash /usr/local/awstats/tools/read_info.sh > /var/log/read_info.log 2>&1 & 5 | 6 | OPENCDN_CONF_FILE="/usr/local/opencdn/conf/opencdn.conf" 7 | OPENCDN_PIPE_PATH="/usr/local/opencdn/pipe" 8 | sys_fifo="${OPENCDN_PIPE_PATH}/sys_info.pipe" 9 | if [ ! -p "$sys_fifo" ];then 10 | mkfifo $sys_fifo 11 | service syslog-ng restart 12 | fi 13 | exec 7<>$sys_fifo 14 | 15 | #mysql initial 16 | function mysql_initial() 17 | { 18 | DB_PassWord=`cat $OPENCDN_CONF_FILE | grep "DB_PassWord" | awk -F = '{print $2}'` 19 | #database initial 20 | DB_HOST="127.0.0.1" 21 | DB_USER="root" 22 | DB_PASSWD="$DB_PassWord" 23 | PORT="3306" 24 | DB_NAME="cdn_info" 25 | TABLENAME="node_info" 26 | select_sql="select * from ${TABLENAME}" 27 | } 28 | 29 | function add_node_mysql() 30 | { 31 | insert_sql="insert into ${TABLENAME} values(\ 32 | \"$1\",\"on\",\ 33 | \"${ip[0]}\",\"${netmask[0]}\",\ 34 | \"${ip[1]}\",\"${netmask[1]}\",\ 35 | \"$System_release\",\"$Kernel_release\",\ 36 | \"$Frequency\",\"$CPU_cores\",\ 37 | \"${Mem_total}M\",\ 38 | \"${Swap_total}M\",\ 39 | \"${Disk_total}M\",\ 40 | \"0%\",\"0%\",\ 41 | \"${onboot[0]}\",\"${send_last[0]}\",\"${recv_last[0]}\",\"${send_total_rate[0]}\",\"${recv_total_rate[0]}\",\ 42 | \"${onboot[1]}\",\"${send_last[1]}\",\"${recv_last[1]}\",\"${send_total_rate[1]}\",\"${recv_total_rate[1]}\",\ 43 | \"${Mem_used}M\",\"${Mem_free}M\",\"$Mem_per\",\ 44 | \"${Swap_used}M\",\"${Swap_free}M\",\"$Swap_per\",\ 45 | \"${Disk_used}M\",\"${Disk_free}M\",\"$Disk_per\",\ 46 | \"${cache}\"\ 47 | )" 48 | mysql -h${DB_HOST} -P${PORT} -u${DB_USER} -p${DB_PASSWD} -D${DB_NAME} -e "${insert_sql};" 49 | } 50 | 51 | node_num=0 52 | 53 | # mysql initial 54 | mysql_initial 55 | 56 | # read configure file of opencdn 57 | # read_conf 58 | 59 | while : 60 | do 61 | read -u7 LINE 62 | IP=`echo "$LINE" | awk '{print $1}'` 63 | # echo "$IP" 64 | if [ -z "${IP}" ] 65 | then 66 | continue 67 | fi 68 | 69 | is_node_exist=`mysql -h${DB_HOST} -P${PORT} -u${DB_USER} -p${DB_PASSWD} -D${DB_NAME} -e "${select_sql} where NodeIP=\"${IP}\";"` 70 | if [ ! -z "$is_node_exist" ] 71 | then 72 | mysql_cmd=`echo "$LINE" | sed "s/^${IP} //"` 73 | if [ -z "`echo $mysql_cmd | grep ^update`" ] 74 | then 75 | mysql_cmd="update "${mysql_cmd} 76 | fi 77 | mysql -h${DB_HOST} -P${PORT} -u${DB_USER} -p${DB_PASSWD} -D${DB_NAME} -e "${mysql_cmd} where NodeIP=\"${IP}\";" 78 | fi 79 | done 80 | -------------------------------------------------------------------------------- /rpm/centos/6/64/inotify-tools-3.14-1.el6.x86_64.rpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/rpm/centos/6/64/inotify-tools-3.14-1.el6.x86_64.rpm -------------------------------------------------------------------------------- /rpm/centos/6/64/opencdn-console-1.1-1.el6-noarch.rpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/rpm/centos/6/64/opencdn-console-1.1-1.el6-noarch.rpm -------------------------------------------------------------------------------- /rpm/centos/6/64/opencdn-console-1.1-2.el6-noarch.rpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/rpm/centos/6/64/opencdn-console-1.1-2.el6-noarch.rpm -------------------------------------------------------------------------------- /rpm/centos/6/64/syslog-ng-3.2.5-6.el6.x86_64.rpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/rpm/centos/6/64/syslog-ng-3.2.5-6.el6.x86_64.rpm -------------------------------------------------------------------------------- /rpm/centos/6/i386/inotify-tools-3.14-1.el6.i686.rpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/rpm/centos/6/i386/inotify-tools-3.14-1.el6.i686.rpm -------------------------------------------------------------------------------- /rpm/centos/6/i386/opencdn-console-1.1-2.el6-noarch.rpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/rpm/centos/6/i386/opencdn-console-1.1-2.el6-noarch.rpm -------------------------------------------------------------------------------- /rpm/centos/6/i386/syslog-ng-3.2.5-6.el6.i686.rpm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/firefoxbug/OpenCDN_Console/4ba837c88ba567b3eae89fcc4eebe7d3714dc95a/rpm/centos/6/i386/syslog-ng-3.2.5-6.el6.i686.rpm -------------------------------------------------------------------------------- /rsync_send: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ########################### 4 | #rsync_tmp='/usr/local/opencdn/conf_rsync,ocdn.me,ocdn_nginx,ocdn' 5 | rsync_tmp='/usr/local/opencdn/nginx,ocdn.me,ocdn_nginx,ocdn' 6 | OPENCDN_CONF_FILE="/usr/local/opencdn/conf/opencdn.conf" 7 | OPENCDN_LOG_PATH="/var/log/opencdn" 8 | 9 | if [ ! -f "$OPENCDN_CONF_FILE" ] 10 | then 11 | echo "$OPENCDN_CONF_FILE does not exist !" 12 | exit 1 13 | fi 14 | 15 | i=1 16 | cat $OPENCDN_CONF_FILE | sed '/^#/D' | grep -i "Node[0-9]" | while read NodeIP 17 | do 18 | Node[$i]=`echo "$NodeIP" | awk -F = '{print $2}'` 19 | # echo "Node$i : ${Node[$i]}" 20 | item=`echo "$rsync_tmp" | sed "s/ocdn.me/${Node[$i]}/"` 21 | # echo $item 22 | dir=`echo $item | awk -F"," '{print $1}'` 23 | host=`echo $item | awk -F"," '{print $2}'` 24 | module=`echo $item | awk -F"," '{print $3}'` 25 | user=`echo $item | awk -F"," '{print $4}'` 26 | /usr/bin/inotifywait -mrq --timefmt '%d/%m/%y %H:%M' --format '%T %w%f%e' -e modify,delete,create,attrib $dir \ 27 | | while read files 28 | do 29 | /usr/bin/rsync -vzrtp --delete --progress --password-file=/etc/rsyncd.pwd $dir ${user}@$host::$module 30 | echo "${files} was rsyncd" >> ${OPENCDN_LOG_PATH}/rsync.error 2>&1 31 | done & 32 | let i=$i+1 33 | done 34 | -------------------------------------------------------------------------------- /syn_node: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | RSYNC_CONF="/usr/local/opencdn/nginx" 4 | STAUTS="`wget http://127.0.0.1/ocdn/?task -O status.txt > /dev/null 2&>1 ;cat status.txt`" 5 | echo "`date` : $STAUTS" 6 | if [ "$STAUTS" == "true" ] 7 | then 8 | /etc/init.d/opencdn restart > /dev/null 2>&1 9 | sleep 1 10 | echo "syn" > ${RSYNC_CONF}/opencdn.tmp 11 | fi 12 | rm -f status.txt 13 | -------------------------------------------------------------------------------- /syslog-ng.conf: -------------------------------------------------------------------------------- 1 | @version:3.2 2 | options { 3 | flush_lines (0); 4 | time_reopen (10); 5 | log_fifo_size (1000); 6 | long_hostnames (off); 7 | chain_hostnames(no); 8 | use_dns (no); 9 | use_fqdn (no); 10 | create_dirs (no); 11 | keep_hostname (no); 12 | }; 13 | 14 | source ocdn_access_log { 15 | udp(ip(0.0.0.0) port(514)); 16 | }; 17 | source ocdn_sys_log { 18 | udp(ip(0.0.0.0) port(515)); 19 | }; 20 | 21 | template sect { 22 | template("$HOST $MSG\n");template_escape(no); 23 | }; 24 | template sect2 { 25 | template("$MSG\n");template_escape(no); 26 | }; 27 | 28 | destination ocdn_access_pipe { 29 | pipe("/usr/local/opencdn/pipe/access.pipe" template(sect)); 30 | }; 31 | 32 | destination ocdn_sys_pipe { 33 | pipe("/usr/local/opencdn/pipe/sys_info.pipe" template(sect)); 34 | }; 35 | 36 | log { source(ocdn_access_log); destination(ocdn_access_pipe); 37 | }; 38 | 39 | log { source(ocdn_sys_log); destination(ocdn_sys_pipe); 40 | }; 41 | -------------------------------------------------------------------------------- /test.c: -------------------------------------------------------------------------------- 1 | test 2 | fsdfsdf asdasd 3 | -------------------------------------------------------------------------------- /uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #opencdn unistall 3 | #author : firefoxbug 4 | 5 | user="`whoami`" 6 | if [ "$user" != "root" ];then 7 | echo "execute $0 with root !!! " 8 | exit 0; 9 | fi 10 | 11 | echo "==========================OpenCDN====================================" 12 | echo "* *" 13 | echo "* *" 14 | echo "* Welcome To OpenCDN *" 15 | echo "* *" 16 | echo "* *" 17 | echo "==========================OpenCDN====================================" 18 | 19 | echo "" 20 | echo -e "\033[41;37m Please backup your mysql data!!!!! \033[0m" 21 | echo "" 22 | 23 | get_char() 24 | { 25 | SAVEDSTTY=`stty -g` 26 | stty -echo 27 | stty cbreak 28 | dd if=/dev/tty bs=1 count=1 2> /dev/null 29 | stty -raw 30 | stty echo 31 | stty $SAVEDSTTY 32 | } 33 | echo "" 34 | echo "Press any key to start uninstall opencdn , please wait ......" 35 | char=`get_char` 36 | 37 | killall nginx 38 | /etc/init.d/mysql stop 39 | killall mysqld 40 | /usr/local/php/sbin/php-fpm stop 41 | killall php-cgi 42 | 43 | rm -rf /usr/local/php 44 | rm -rf /usr/local/nginx 45 | rm -rf /usr/local/mysql 46 | rm -rf /usr/local/zend 47 | 48 | chkconfig --del nginx 49 | chkconfig --del php-fpm 50 | chkconfig --del mysql 51 | 52 | rm -f /etc/my.cnf 53 | rm -f /etc/init.d/mysql 54 | rm -f /root/vhost.sh 55 | rm -f /root/lnmpd 56 | rm -f /root/bin/rsync.sh 57 | 58 | service opencdn stop 59 | chkconfig --del opencdn 60 | rm -f /etc/init.d/opencdn 61 | rm -f /etc/opencdn/opencdn.conf 62 | rm -rf /etc/opencdn/ 63 | 64 | crontab -r 65 | #remove opencdn resources 66 | rm -rf /home/wwwroot/opencdn/ 67 | rm -rf /home/wwwroot/phpmyadmin/ 68 | rm -rf /home/wwwroot/conf_rsync 69 | rm -rf /home/wwwroot/ocdn 70 | rm -rf /home/wwwroot/ 71 | rm -rf /home/wwwlogs 72 | rm -rf /home/logs 73 | #remove syslog-ng 74 | service syslog-ng stop 75 | yum -y remove syslog-ng 76 | rm -rf /etc/syslog-ng/ 77 | 78 | rm -f /home/sys_info.pipe 79 | rm -f /home/node_url.pipe 80 | 81 | #remove awstats 82 | #rm -rf /usr/local/awstats/ 83 | 84 | #remove rsync 85 | yum -y remove rsync 86 | rm -f /etc/rsyncd.pwd 87 | rm -f /root/bin/rsync.sh 88 | 89 | rm -rf /usr/local/opencdn/ 90 | 91 | #remove logs 92 | rm -rf /var/log/opencdn -------------------------------------------------------------------------------- /目录结构.txt: -------------------------------------------------------------------------------- 1 | /usr/local/opencdn 2 | . 3 | |-- conf 4 | | `-- opencdn.conf 5 | |-- nginx #web前端生成的配置 6 | |-- node_logs # 节点日志采集后写入此目录 7 | |-- ocdn # Web资源 8 | |-- pipe # 管道目录 9 | | |-- access.pipe |--节点access日志文件管道 10 | | `-- sys_info.pipe `--节点系统信息管道 11 | `-- sbin # OpenCDN执行文件 12 | |-- do_accesslog |--处理access日志文件程序 13 | |-- icmp |--节点健康状态检测程序 14 | |-- read_info |--节点系统信息读取程序 15 | |-- rsync_send |--本地rsync推送程序 16 | `-- syn_node `--前端触发以及OpenCDN重启系统 17 | 18 | /var/log/opencdn/ 19 | . 20 | |-- do_accesslog.log 21 | |-- node_health.log 22 | |-- read_info.log 23 | |-- rsync-send.log 24 | `-- syn_node.log 25 | 26 | /etc/syslog-ng/ 27 | . 28 | `-- syslog-ng.conf 29 | 30 | --------------------------------------------------------------------------------