diff --git a/codes/agent/game-docker/dlweb/api/ntunnel_mysql.php b/codes/agent/game-docker/dlweb/api/ntunnel_mysql.php deleted file mode 100644 index 0bbd641..0000000 --- a/codes/agent/game-docker/dlweb/api/ntunnel_mysql.php +++ /dev/null @@ -1,547 +0,0 @@ -name); - $str .= GetBlock($finfo->table); - - $type = $finfo->type; - $length = $finfo->length; - - $str .= GetLongBinary($type); - - $intflag = $finfo->flags; - $str .= GetLongBinary($intflag); - - $str .= GetLongBinary($length); - } else { - $str .= GetBlock(mysql_field_name($res, $i)); - $str .= GetBlock(mysql_field_table($res, $i)); - - $type = mysql_field_type($res, $i); - $length = mysql_field_len($res, $i); - switch ($type) { - case "int": - if( $length > 11 ) $type = 8; - else $type = 3; - break; - case "real": - if( $length == 12 ) $type = 4; - elseif( $length == 22 ) $type = 5; - else $type = 0; - break; - case "null": - $type = 6; - break; - case "timestamp": - $type = 7; - break; - case "date": - $type = 10; - break; - case "time": - $type = 11; - break; - case "datetime": - $type = 12; - break; - case "year": - $type = 13; - break; - case "blob": - if( $length > 16777215 ) $type = 251; - elseif( $length > 65535 ) $type = 250; - elseif( $length > 255 ) $type = 252; - else $type = 249; - break; - default: - $type = 253; - } - $str .= GetLongBinary($type); - - $flags = explode( " ", mysql_field_flags ( $res, $i ) ); - $intflag = 0; - if(in_array( "not_null", $flags )) $intflag += 1; - if(in_array( "primary_key", $flags )) $intflag += 2; - if(in_array( "unique_key", $flags )) $intflag += 4; - if(in_array( "multiple_key", $flags )) $intflag += 8; - if(in_array( "blob", $flags )) $intflag += 16; - if(in_array( "unsigned", $flags )) $intflag += 32; - if(in_array( "zerofill", $flags )) $intflag += 64; - if(in_array( "binary", $flags)) $intflag += 128; - if(in_array( "enum", $flags )) $intflag += 256; - if(in_array( "auto_increment", $flags )) $intflag += 512; - if(in_array( "timestamp", $flags )) $intflag += 1024; - if(in_array( "set", $flags )) $intflag += 2048; - $str .= GetLongBinary($intflag); - - $str .= GetLongBinary($length); - } - } - echo $str; -} - -function EchoData($res, $numfields, $numrows) -{ - for( $i = 0; $i < $numrows; $i++ ) { - $str = ""; - $row = null; - if ($GLOBALS['use_mysqli']) - $row = mysqli_fetch_row( $res ); - else - $row = mysql_fetch_row( $res ); - for( $j = 0; $j < $numfields; $j++ ){ - if( is_null($row[$j]) ) - $str .= "\xFF"; - else - $str .= GetBlock($row[$j]); - } - echo $str; - } -} - - -function doSystemTest() -{ - function output($description, $succ, $resStr) { - echo "$description$resStr[0]" : "class=\"TestFail\">$resStr[1]"; - } - output("PHP version >= 4.0.5", phpversion_int() >= 40005, array("Yes", "No")); - output("mysql_connect() available", function_exists("mysql_connect"), array("Yes", "No")); - output("mysqli_connect() available", function_exists("mysqli_connect"), array("Yes", "No")); - if (phpversion_int() >= 40302 && substr($_SERVER["SERVER_SOFTWARE"], 0, 6) == "Apache" && function_exists("apache_get_modules")){ - if (in_array("mod_security2", apache_get_modules())) - output("Mod Security 2 installed", false, array("No", "Yes")); - } -} - -///////////////////////////////////////////////////////////////////////////// -//// - - if (phpversion_int() < 40005) { - EchoHeader(201); - echo GetBlock("unsupported php version"); - exit(); - } - - if (phpversion_int() < 40010) { - global $HTTP_POST_VARS; - $_POST = &$HTTP_POST_VARS; - } - - if (!isset($_POST["actn"]) || !isset($_POST["host"]) || !isset($_POST["port"]) || !isset($_POST["login"])) { - $testMenu = $allowTestMenu; - if (!$testMenu){ - EchoHeader(202); - echo GetBlock("invalid parameters"); - exit(); - } - } - - if (!$testMenu){ - if ($_POST["encodeBase64"] == '1') { - for($i=0;$i= 50005){ // for unicode database name - mysqli_set_charset($conn, 'UTF8'); - } - if($errno_c > 0) { - EchoHeader($errno_c); - echo GetBlock(mysqli_connect_error($conn)); - exit; - } - - if(($errno_c <= 0) && ( $_POST["db"] != "" )) { - $res = mysqli_select_db($conn, $_POST["db"] ); - $errno_c = mysqli_errno($conn); - } - - EchoHeader($errno_c); - if($errno_c > 0) { - echo GetBlock(mysqli_error($conn)); - } elseif($_POST["actn"] == "C") { - EchoConnInfo($conn); - } elseif($_POST["actn"] == "Q") { - for($i=0;$i 0) - echo GetBlock(mysqli_error($conn)); - else { - if($numfields > 0) { - EchoFieldsHeader($res, $numfields); - EchoData($res, $numfields, $numrows); - } else { - if(phpversion_int() >= 40300) - echo GetBlock(mysqli_info($conn)); - else - echo GetBlock(""); - } - } - if($i<(count($_POST["q"])-1)) - echo "\x01"; - else - echo "\x00"; - if (false !== $res) - mysqli_free_result($res); - } - } - } else { - if( $_POST["port"] ) $hs .= ":".$_POST["port"]; - $conn = mysql_connect($hs, $_POST["login"], $_POST["password"]); - $errno_c = mysql_errno(); - if (phpversion_int() >= 50203){ // for unicode database name - mysql_set_charset('UTF8', $conn); - } - if(($errno_c <= 0) && ( $_POST["db"] != "" )) { - $res = mysql_select_db( $_POST["db"], $conn); - $errno_c = mysql_errno(); - } - - EchoHeader($errno_c); - if($errno_c > 0) { - echo GetBlock(mysql_error()); - } elseif($_POST["actn"] == "C") { - EchoConnInfo($conn); - } elseif($_POST["actn"] == "Q") { - for($i=0;$i 0) - echo GetBlock(mysql_error()); - else { - if($numfields > 0) { - EchoFieldsHeader($res, $numfields); - EchoData($res, $numfields, $numrows); - } else { - if(phpversion_int() >= 40300) - echo GetBlock(mysql_info($conn)); - else - echo GetBlock(""); - } - } - if($i<(count($_POST["q"])-1)) - echo "\x01"; - else - echo "\x00"; - mysql_free_result($res); - } - } - } - exit(); - } - - header("Content-Type: text/html"); -//// -///////////////////////////////////////////////////////////////////////////// -?> - - - - - Navicat HTTP Tunnel Tester - - - - - - -
-

- Navicat™
- The gateway to your database! -

-
- System Environment Test - - "> - -
PHP installed properlyNo
-
-
-
- Server Test -
- - - - - - - - - -
Hostname/IP Address:
Port:
Initial Database:
Username:
Password:
Database File:

-
-

-
- -
- - \ No newline at end of file diff --git a/codes/agent/game-docker/docker/nginx/default.conf.template b/codes/agent/game-docker/docker/nginx/default.conf.template index 3e0096e..7252e7b 100644 --- a/codes/agent/game-docker/docker/nginx/default.conf.template +++ b/codes/agent/game-docker/docker/nginx/default.conf.template @@ -10,6 +10,14 @@ upstream wxserver_service { server wxserver:3000; } +# ── 限速区域定义(在 http 块级别,此处用 geo 标记 + limit_req_zone)── +# 登录接口:每个 IP 每秒最多 5 次请求,突发缓冲 10 次 +limit_req_zone $binary_remote_addr zone=login_limit:10m rate=5r/s; +# 通用 API:每个 IP 每秒最多 30 次请求 +limit_req_zone $binary_remote_addr zone=api_limit:10m rate=30r/s; +# 连接数限制:每个 IP 同时最多 20 个连接 +limit_conn_zone $binary_remote_addr zone=conn_limit:10m; + # ============================================= # 域名路由模式 + SSL(Let's Encrypt 自动证书) # @@ -108,10 +116,45 @@ server { ssl_certificate_key /etc/letsencrypt/live/${API_DOMAIN}/privkey.pem; include /etc/nginx/snippets/ssl-params.conf; + # 隐藏服务器版本信息 + server_tokens off; + + # 请求体大小限制(防止大请求攻击) + client_max_body_size 10m; + client_body_timeout 30s; + client_header_timeout 30s; + + # 连接数限制 + limit_conn conn_limit 20; + + # ── 屏蔽敏感文件(直接返回 404,不暴露文件存在)── + location ~* \.(env|sh|bak|sql|log|git|svn|htaccess|htpasswd|ini|conf)$ { + return 404; + } + location ~* /(ntunnel_mysql|phpMyAdmin|phpmyadmin|adminer|debug)\.php$ { + return 404; + } + location ~ /\. { + return 404; + } + + # ── 登录接口限速(防爆破)── + location ~* /source/login/ { + limit_req zone=login_limit burst=10 nodelay; + limit_req_status 429; + proxy_pass http://api_service; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Port $server_port; + } + # wxserver 路由:/wx/ 前缀转发给 wxserver 容器,自动去除 /wx 前缀 # 例:/wx/auth/oa/callback → wxserver:/auth/oa/callback # 例:/wx/api/login → wxserver:/api/login location /wx/ { + limit_req zone=api_limit burst=50 nodelay; proxy_pass http://wxserver_service/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -132,6 +175,7 @@ server { # PHP API(所有其他请求) location / { + limit_req zone=api_limit burst=50 nodelay; proxy_pass http://api_service; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -151,7 +195,30 @@ server { ssl_certificate_key /etc/letsencrypt/live/${DLWEB_DOMAIN}/privkey.pem; include /etc/nginx/snippets/ssl-params.conf; + # 隐藏服务器版本信息 + server_tokens off; + + # 请求体大小限制 + client_max_body_size 10m; + client_body_timeout 30s; + client_header_timeout 30s; + + # 连接数限制 + limit_conn conn_limit 20; + + # ── 屏蔽敏感文件 ── + location ~* \.(env|sh|bak|sql|log|git|svn|htaccess|htpasswd|ini|conf)$ { + return 404; + } + location ~* /(ntunnel_mysql|phpMyAdmin|phpmyadmin|adminer|debug)\.php$ { + return 404; + } + location ~ /\. { + return 404; + } + location / { + limit_req zone=api_limit burst=50 nodelay; proxy_pass http://dlweb_service; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/codes/agent/game-docker/docker/nginx/ssl-params.conf b/codes/agent/game-docker/docker/nginx/ssl-params.conf index a018610..e7fb388 100644 --- a/codes/agent/game-docker/docker/nginx/ssl-params.conf +++ b/codes/agent/game-docker/docker/nginx/ssl-params.conf @@ -5,8 +5,8 @@ ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; ssl_prefer_server_ciphers off; -# HSTS (取消注释以启用,请确认所有子域都支持 HTTPS 后再启用) -# add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always; +# HSTS:强制浏览器只用 HTTPS 连接(去掉 includeSubDomains,避免影响其他未配置 HTTPS 的子域名) +add_header Strict-Transport-Security "max-age=31536000" always; # OCSP Stapling ssl_stapling on; @@ -21,3 +21,17 @@ ssl_session_tickets off; # DH 参数 (如果生成了 dhparam.pem) # ssl_dhparam /etc/nginx/ssl/dhparam.pem; + +# ── 安全响应头 ────────────────────────────────────────────────────── +# 防点击劫持:禁止页面被嵌入 iframe +add_header X-Frame-Options "SAMEORIGIN" always; +# 防 MIME 类型嗅探 +add_header X-Content-Type-Options "nosniff" always; +# 启用浏览器内置 XSS 过滤(旧浏览器兼容) +add_header X-XSS-Protection "1; mode=block" always; +# 限制 Referer 信息泄露 +add_header Referrer-Policy "strict-origin-when-cross-origin" always; +# 隐藏 nginx 版本号(在 nginx.conf 中配合 server_tokens off 使用) +# Content Security Policy:按需调整,当前允许同源 + 必要的外部资源 +# frame-ancestors 额外放开微信支付收银台来源,避免微信 H5 支付 iframe 被拦截 +add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' res.wx.qq.com; img-src 'self' data: https:; style-src 'self' 'unsafe-inline'; connect-src 'self' https:; frame-ancestors 'self' https://wx.tenpay.com https://*.weixin.qq.com https://*.qq.com;" always; diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250726.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250726.log.gz new file mode 100644 index 0000000..4f47aba Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250726.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250727.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250727.log.gz new file mode 100644 index 0000000..7296ad3 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250727.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250728.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250728.log.gz new file mode 100644 index 0000000..638b1ac Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250728.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250729.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250729.log.gz new file mode 100644 index 0000000..a960c35 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250729.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250730.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250730.log.gz new file mode 100644 index 0000000..9fd9450 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250730.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250731.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250731.log.gz new file mode 100644 index 0000000..3878796 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250731.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250801.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250801.log.gz new file mode 100644 index 0000000..7db953b Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250801.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250802.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250802.log.gz new file mode 100644 index 0000000..10d9c87 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250802.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250803.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250803.log.gz new file mode 100644 index 0000000..d2b4ff8 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250803.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250804.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250804.log.gz new file mode 100644 index 0000000..7b2b49e Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250804.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250805.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250805.log.gz new file mode 100644 index 0000000..252a557 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250805.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250806.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250806.log.gz new file mode 100644 index 0000000..588a8d4 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250806.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250807.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250807.log.gz new file mode 100644 index 0000000..ffd4f81 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250807.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250808.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250808.log.gz new file mode 100644 index 0000000..cffff5e Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250808.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250809.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250809.log.gz new file mode 100644 index 0000000..5f766a8 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250809.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250810.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250810.log.gz new file mode 100644 index 0000000..f4ec956 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250810.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250811.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250811.log.gz new file mode 100644 index 0000000..ea42a46 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250811.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250812.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250812.log.gz new file mode 100644 index 0000000..df0181f Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250812.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250813.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250813.log.gz new file mode 100644 index 0000000..543e6a1 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250813.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250814.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250814.log.gz new file mode 100644 index 0000000..5eddcd3 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250814.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250815.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250815.log.gz new file mode 100644 index 0000000..405fc87 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250815.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250816.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250816.log.gz new file mode 100644 index 0000000..ee10660 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250816.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250817.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250817.log.gz new file mode 100644 index 0000000..5fcf5e2 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250817.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250818.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250818.log.gz new file mode 100644 index 0000000..62a0818 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250818.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250819.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250819.log.gz new file mode 100644 index 0000000..72b5790 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250819.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250820.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250820.log.gz new file mode 100644 index 0000000..7d5989d Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250820.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250821.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250821.log.gz new file mode 100644 index 0000000..898f83c Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250821.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250822.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250822.log.gz new file mode 100644 index 0000000..0274a12 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250822.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250823.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250823.log.gz new file mode 100644 index 0000000..97748c6 Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250823.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250824.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250824.log.gz new file mode 100644 index 0000000..548597e Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250824.log.gz differ diff --git a/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250825.log.gz b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250825.log.gz new file mode 100644 index 0000000..fb0f78b Binary files /dev/null and b/codes/yunhost/ftplogs/vsftpd_hyu3136430001_20250825.log.gz differ diff --git a/codes/yunhost/htdocs/1.txt b/codes/yunhost/htdocs/1.txt new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/codes/yunhost/htdocs/1.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/codes/yunhost/htdocs/logreport/no_delete b/codes/yunhost/htdocs/logreport/no_delete new file mode 100644 index 0000000..e69de29 diff --git a/codes/yunhost/htdocs/mysql.php b/codes/yunhost/htdocs/mysql.php new file mode 100644 index 0000000..2ff753d --- /dev/null +++ b/codes/yunhost/htdocs/mysql.php @@ -0,0 +1,147 @@ + "rm-bp1749tfxu2rpq670lo.mysql.rds.aliyuncs.com", + "name" => "game_db", + "user" => "games", + "pwd" => "Games0791!!", + "port" => "3306" + // "host" => "120.25.60.74", + // "name" => "youle_games", + // "user" => "root", + // "pwd" => "root", + // "port" => "3333" +); + +//错误编码及提示 +$G_Error = array( + "condb" => array("code" => 81, "msg" => "连接数据库失败"), + "execsql" => array("code" => 82, "msg" => "操作数据库失败"), + "d_wrong" => array("code" => 83, "msg" => "data参数错误"), + "m_wrong" => array("code" => 84, "msg" => "m参数错误"), + "s_wrong" => array("code" => 85, "msg" => "s参数错误"), + "p_wrong" => array("code" => 86, "msg" => "p参数错误"), +); + +///////////////////////////// 全局变量 ///////////////////////////// +//接口函数返回的json对象 +$G_Result = array( + "state" => 0, //0:成功 <>0:错误编码 + "error" => "", //错误时的描述 + "param" => "", //接收的参数 + "data" => array() //成功时的数据 +); + +//返回结果$G_G_Result +function do_return(){ + global $G_Result; + // if (count($G_Result["data"]) == 0) { + // $G_Result["data"] = new stdClass; + // } + echo json_encode($G_Result); + exit(); +} + +////////////////////////// 连接MYSQL数据库 ///////////////////////// +$PDO = null; +try +{ + $PDO = new PDO("mysql:host=".$G_MySql["host"].";port=".$G_MySql["port"].";dbname=".$G_MySql["name"], $G_MySql["user"], $G_MySql["pwd"]); + $PDO->exec("set names utf8;"); + $PDO->exec("use ".$G_MySql["name"].";"); +} +catch (Exception $e) +{ + $G_Result['state'] = $G_Error["condb"]["code"]; + $G_Result['error'] = $G_Error["condb"]["msg"]; + do_return(); +} + +//////////////////////////// 读取参数 //////////////////////////// +//读取data参数 +$str_data = GetRequest("data"); +$str_data = stripslashes($str_data); //解决表单POST传参数时,自动加转义字符的问题 +$str_data = str_replace("^","=",$str_data); +$str_data = str_replace("#","+",$str_data); +$str_data = str_replace("!","&",$str_data); +$G_Result['param'] = $str_data; + +//检查data是否为空 +if ($str_data == "") { + $G_Result['state'] = $G_Error["d_wrong"]["code"]; + $G_Result['error'] = $G_Error["d_wrong"]["msg"]; + do_return(); +} + +//检查data是否能转成json +$json_para = json_decode($str_data); +if ($json_para == null) { + $G_Result['state'] = $G_Error["d_wrong"]["code"]; + $G_Result['error'] = $G_Error["d_wrong"]["msg"]; + do_return(); +} + +$m = $json_para->m; +$s = $json_para->s; +$p = $json_para->p; + +//检查m值 +if (($m == null) || ($m == "") || (!function_exists($m))) { + $G_Result['state'] = $G_Error["m_wrong"]["code"]; + $G_Result['error'] = $G_Error["m_wrong"]["msg"]; + do_return(); +} +//检查s值 +if (($s == null) || ($s == "")) { + $G_Result['state'] = $G_Error["s_wrong"]["code"]; + $G_Result['error'] = $G_Error["s_wrong"]["msg"]; + do_return(); +} +//检查p值 +if (($p != null) && (!is_array($p))) { + $G_Result['state'] = $G_Error["p_wrong"]["code"]; + $G_Result['error'] = $G_Error["p_wrong"]["msg"]; + do_return(); +} + +$m($s, $p); +do_return(); + +//根据参数名获取参数 +function GetRequest($name) { + return isset($_REQUEST[$name])?$_REQUEST[$name]:''; +} + +//执行sql语句返回结果 +function opensql($sql, $para) { + global $G_Result, $G_Error, $PDO; + $stmt = $PDO->prepare($sql.";"); + if ($stmt->execute($para)) + { + while ($aryData = $stmt->fetch(PDO::FETCH_NAMED)) { + $G_Result["data"][] = $aryData; + } + } else { + $G_Result['state'] = $G_Error["execsql"]["code"]; + $G_Result['error'] = $G_Error["execsql"]["msg"]; + } +} + +//执行sql语句无返回结果 +function execsql($sql, $para){ + global $G_Result, $G_Error, $PDO; + $stmt = $PDO->prepare($sql.";"); + if ($stmt->execute($para)) + {} else { + $G_Result['state'] = $G_Error["execsql"]["code"]; + $G_Result['error'] = $G_Error["execsql"]["msg"]; + } +} +?> \ No newline at end of file diff --git a/codes/yunhost/htdocs/mysql_agent.php b/codes/yunhost/htdocs/mysql_agent.php new file mode 100644 index 0000000..2819b59 --- /dev/null +++ b/codes/yunhost/htdocs/mysql_agent.php @@ -0,0 +1,147 @@ + "rm-bp1btyuwq77591x0jpo.mysql.rds.aliyuncs.com", + "name" => "agent_db", + "user" => "games", + "pwd" => "Games0791!!", + "port" => "3306" + // "host" => "120.92.140.132", + // "name" => "game_db", + // "user" => "root", + // "pwd" => "root_root", + // "port" => "3309" +); + +//错误编码及提示 +$G_Error = array( + "condb" => array("code" => 81, "msg" => "连接数据库失败"), + "execsql" => array("code" => 82, "msg" => "操作数据库失败"), + "d_wrong" => array("code" => 83, "msg" => "data参数错误"), + "m_wrong" => array("code" => 84, "msg" => "m参数错误"), + "s_wrong" => array("code" => 85, "msg" => "s参数错误"), + "p_wrong" => array("code" => 86, "msg" => "p参数错误"), +); + +///////////////////////////// 全局变量 ///////////////////////////// +//接口函数返回的json对象 +$G_Result = array( + "state" => 0, //0:成功 <>0:错误编码 + "error" => "", //错误时的描述 + "param" => "", //接收的参数 + "data" => array() //成功时的数据 +); + +//返回结果$G_G_Result +function do_return(){ + global $G_Result; + // if (count($G_Result["data"]) == 0) { + // $G_Result["data"] = new stdClass; + // } + echo json_encode($G_Result); + exit(); +} + +////////////////////////// 连接MYSQL数据库 ///////////////////////// +$PDO = null; +try +{ + $PDO = new PDO("mysql:host=".$G_MySql["host"].";port=".$G_MySql["port"].";dbname=".$G_MySql["name"], $G_MySql["user"], $G_MySql["pwd"]); + $PDO->exec("set names utf8;"); + $PDO->exec("use ".$G_MySql["name"].";"); +} +catch (Exception $e) +{ + $G_Result['state'] = $G_Error["condb"]["code"]; + $G_Result['error'] = $G_Error["condb"]["msg"]; + do_return(); +} + +//////////////////////////// 读取参数 //////////////////////////// +//读取data参数 +$str_data = GetRequest("data"); +$str_data = stripslashes($str_data); //解决表单POST传参数时,自动加转义字符的问题 +$str_data = str_replace("^","=",$str_data); +$str_data = str_replace("#","+",$str_data); +$str_data = str_replace("!","&",$str_data); +$G_Result['param'] = $str_data; + +//检查data是否为空 +if ($str_data == "") { + $G_Result['state'] = $G_Error["d_wrong"]["code"]; + $G_Result['error'] = $G_Error["d_wrong"]["msg"]; + do_return(); +} + +//检查data是否能转成json +$json_para = json_decode($str_data); +if ($json_para == null) { + $G_Result['state'] = $G_Error["d_wrong"]["code"]; + $G_Result['error'] = $G_Error["d_wrong"]["msg"]; + do_return(); +} + +$m = $json_para->m; +$s = $json_para->s; +$p = $json_para->p; + +//检查m值 +if (($m == null) || ($m == "") || (!function_exists($m))) { + $G_Result['state'] = $G_Error["m_wrong"]["code"]; + $G_Result['error'] = $G_Error["m_wrong"]["msg"]; + do_return(); +} +//检查s值 +if (($s == null) || ($s == "")) { + $G_Result['state'] = $G_Error["s_wrong"]["code"]; + $G_Result['error'] = $G_Error["s_wrong"]["msg"]; + do_return(); +} +//检查p值 +if (($p != null) && (!is_array($p))) { + $G_Result['state'] = $G_Error["p_wrong"]["code"]; + $G_Result['error'] = $G_Error["p_wrong"]["msg"]; + do_return(); +} + +$m($s, $p); +do_return(); + +//根据参数名获取参数 +function GetRequest($name) { + return isset($_REQUEST[$name])?$_REQUEST[$name]:''; +} + +//执行sql语句返回结果 +function opensql($sql, $para) { + global $G_Result, $G_Error, $PDO; + $stmt = $PDO->prepare($sql.";"); + if ($stmt->execute($para)) + { + while ($aryData = $stmt->fetch(PDO::FETCH_NAMED)) { + $G_Result["data"][] = $aryData; + } + } else { + $G_Result['state'] = $G_Error["execsql"]["code"]; + $G_Result['error'] = $G_Error["execsql"]["msg"]; + } +} + +//执行sql语句无返回结果 +function execsql($sql, $para){ + global $G_Result, $G_Error, $PDO; + $stmt = $PDO->prepare($sql.";"); + if ($stmt->execute($para)) + {} else { + $G_Result['state'] = $G_Error["execsql"]["code"]; + $G_Result['error'] = $G_Error["execsql"]["msg"]; + } +} +?> \ No newline at end of file diff --git a/codes/yunhost/htdocs/mysql_grade.php b/codes/yunhost/htdocs/mysql_grade.php new file mode 100644 index 0000000..903a12c --- /dev/null +++ b/codes/yunhost/htdocs/mysql_grade.php @@ -0,0 +1,147 @@ + "rm-bp1749tfxu2rpq670lo.mysql.rds.aliyuncs.com", + "name" => "grade_db", + "user" => "games", + "pwd" => "Games0791!!", + "port" => "3306" + // "host" => "120.25.60.74", + // "name" => "youle_games", + // "user" => "root", + // "pwd" => "root", + // "port" => "3333" +); + +//错误编码及提示 +$G_Error = array( + "condb" => array("code" => 81, "msg" => "连接数据库失败"), + "execsql" => array("code" => 82, "msg" => "操作数据库失败"), + "d_wrong" => array("code" => 83, "msg" => "data参数错误"), + "m_wrong" => array("code" => 84, "msg" => "m参数错误"), + "s_wrong" => array("code" => 85, "msg" => "s参数错误"), + "p_wrong" => array("code" => 86, "msg" => "p参数错误"), +); + +///////////////////////////// 全局变量 ///////////////////////////// +//接口函数返回的json对象 +$G_Result = array( + "state" => 0, //0:成功 <>0:错误编码 + "error" => "", //错误时的描述 + "param" => "", //接收的参数 + "data" => array() //成功时的数据 +); + +//返回结果$G_G_Result +function do_return(){ + global $G_Result; + // if (count($G_Result["data"]) == 0) { + // $G_Result["data"] = new stdClass; + // } + echo json_encode($G_Result); + exit(); +} + +////////////////////////// 连接MYSQL数据库 ///////////////////////// +$PDO = null; +try +{ + $PDO = new PDO("mysql:host=".$G_MySql["host"].";port=".$G_MySql["port"].";dbname=".$G_MySql["name"], $G_MySql["user"], $G_MySql["pwd"]); + $PDO->exec("set names utf8;"); + $PDO->exec("use ".$G_MySql["name"].";"); +} +catch (Exception $e) +{ + $G_Result['state'] = $G_Error["condb"]["code"]; + $G_Result['error'] = $G_Error["condb"]["msg"]; + do_return(); +} + +//////////////////////////// 读取参数 //////////////////////////// +//读取data参数 +$str_data = GetRequest("data"); +$str_data = stripslashes($str_data); //解决表单POST传参数时,自动加转义字符的问题 +$str_data = str_replace("^","=",$str_data); +$str_data = str_replace("#","+",$str_data); +$str_data = str_replace("!","&",$str_data); +$G_Result['param'] = $str_data; + +//检查data是否为空 +if ($str_data == "") { + $G_Result['state'] = $G_Error["d_wrong"]["code"]; + $G_Result['error'] = $G_Error["d_wrong"]["msg"]; + do_return(); +} + +//检查data是否能转成json +$json_para = json_decode($str_data); +if ($json_para == null) { + $G_Result['state'] = $G_Error["d_wrong"]["code"]; + $G_Result['error'] = $G_Error["d_wrong"]["msg"]; + do_return(); +} + +$m = $json_para->m; +$s = $json_para->s; +$p = $json_para->p; + +//检查m值 +if (($m == null) || ($m == "") || (!function_exists($m))) { + $G_Result['state'] = $G_Error["m_wrong"]["code"]; + $G_Result['error'] = $G_Error["m_wrong"]["msg"]; + do_return(); +} +//检查s值 +if (($s == null) || ($s == "")) { + $G_Result['state'] = $G_Error["s_wrong"]["code"]; + $G_Result['error'] = $G_Error["s_wrong"]["msg"]; + do_return(); +} +//检查p值 +if (($p != null) && (!is_array($p))) { + $G_Result['state'] = $G_Error["p_wrong"]["code"]; + $G_Result['error'] = $G_Error["p_wrong"]["msg"]; + do_return(); +} + +$m($s, $p); +do_return(); + +//根据参数名获取参数 +function GetRequest($name) { + return isset($_REQUEST[$name])?$_REQUEST[$name]:''; +} + +//执行sql语句返回结果 +function opensql($sql, $para) { + global $G_Result, $G_Error, $PDO; + $stmt = $PDO->prepare($sql.";"); + if ($stmt->execute($para)) + { + while ($aryData = $stmt->fetch(PDO::FETCH_NAMED)) { + $G_Result["data"][] = $aryData; + } + } else { + $G_Result['state'] = $G_Error["execsql"]["code"]; + $G_Result['error'] = $G_Error["execsql"]["msg"]; + } +} + +//执行sql语句无返回结果 +function execsql($sql, $para){ + global $G_Result, $G_Error, $PDO; + $stmt = $PDO->prepare($sql.";"); + if ($stmt->execute($para)) + {} else { + $G_Result['state'] = $G_Error["execsql"]["code"]; + $G_Result['error'] = $G_Error["execsql"]["msg"]; + } +} +?> \ No newline at end of file diff --git a/codes/yunhost/htdocs/zhuye.html b/codes/yunhost/htdocs/zhuye.html new file mode 100644 index 0000000..9eaad2c --- /dev/null +++ b/codes/yunhost/htdocs/zhuye.html @@ -0,0 +1,106 @@ + + + + + + + + + 领先的云计算服务提供商-中国万网(www.net.cn) + + + +
+
+
+ +
+
+ 领先的云计算服务提供商 +
+ +
+
+
+
+
+ +
+
+
您已正式开通主机服务
+
这是万网主机提供的测试访问页,您可以随时进行删除或替换
+
+
+
+ + + + + + +
+
+
如需访问到您的网站,请按照以下步骤操作 +
+
+
+
+
+ 您的首页文件及网站程序需上传至FTP下的HTDOCS目录下
+
+ 您自行设定的首页文件名,需要添加至控制面板默认首页设置的列表中操作帮助
+
+
+ 站点开通流程 +
+
+ + + + + + + + + + + + +
1、获取FTP/数据库信息 + + 2、网站备案(或申请接入) + + 3、上传网站程序 + + 4、网站调试 + + 5、域名绑定
+
+
+ +
+
+ Copyright © 1998 - 2014 中国万网 版权所有 +
+
+ + diff --git a/codes/yunhost/wwwlogs/apache_hyu3136430001_20250818.log.gz b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250818.log.gz new file mode 100644 index 0000000..b3b994d Binary files /dev/null and b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250818.log.gz differ diff --git a/codes/yunhost/wwwlogs/apache_hyu3136430001_20250819.log.gz b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250819.log.gz new file mode 100644 index 0000000..7bda41c Binary files /dev/null and b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250819.log.gz differ diff --git a/codes/yunhost/wwwlogs/apache_hyu3136430001_20250820.log.gz b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250820.log.gz new file mode 100644 index 0000000..281fa54 Binary files /dev/null and b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250820.log.gz differ diff --git a/codes/yunhost/wwwlogs/apache_hyu3136430001_20250821.log.gz b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250821.log.gz new file mode 100644 index 0000000..8329b7a Binary files /dev/null and b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250821.log.gz differ diff --git a/codes/yunhost/wwwlogs/apache_hyu3136430001_20250822.log.gz b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250822.log.gz new file mode 100644 index 0000000..8cbe72b Binary files /dev/null and b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250822.log.gz differ diff --git a/codes/yunhost/wwwlogs/apache_hyu3136430001_20250823.log.gz b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250823.log.gz new file mode 100644 index 0000000..6895302 Binary files /dev/null and b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250823.log.gz differ diff --git a/codes/yunhost/wwwlogs/apache_hyu3136430001_20250824.log.gz b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250824.log.gz new file mode 100644 index 0000000..0fcc7c0 Binary files /dev/null and b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250824.log.gz differ diff --git a/codes/yunhost/wwwlogs/apache_hyu3136430001_20250825.log.gz b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250825.log.gz new file mode 100644 index 0000000..25c86de Binary files /dev/null and b/codes/yunhost/wwwlogs/apache_hyu3136430001_20250825.log.gz differ