diff --git a/class/core/site_api.py b/class/core/site_api.py index de6013295..d79fcdb39 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -763,6 +763,8 @@ class site_api: conf = re.sub(rep, '', conf) rep = "\s+listen\s+\[\:\:\]\:443.*;" conf = re.sub(rep, '', conf) + rep = "\s+http2\s+on;" + conf = re.sub(rep, '', conf) mw.writeFile(file, conf) msg = mw.getInfo('网站[{1}]关闭SSL成功!', (siteName,)) @@ -2784,10 +2786,10 @@ location ^~ {from} {\n\ if conf: if conf.find('ssl_certificate') == -1: #ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; - + # add_header Alt-Svc 'h3=":443";ma=86400,h3-29=":443";ma=86400'; http3Header = """ add_header Strict-Transport-Security "max-age=63072000"; - add_header Alt-Svc 'h3=":443";ma=86400,h3-29=":443";ma=86400'; + add_header Alt-Svc 'h3=":443";ma=86400'; """ if version != '1.25.3.1': http3Header = ''; @@ -2811,11 +2813,17 @@ location ^~ {from} {\n\ tmp = re.findall(rep, conf) if not mw.inArray(tmp, '443'): listen = re.search(rep, conf).group() - http_ssl = "\n\tlisten 443 ssl http2;" - http_ssl = http_ssl + "\n\tlisten [::]:443 ssl http2;" - + if version == '1.25.3.1': + http_ssl = "\n\tlisten 443 ssl;" + http_ssl = http_ssl + "\n\tlisten [::]:443 ssl;#reuseport" http_ssl = http_ssl + "\n\tlisten 443 quic;" + http_ssl = http_ssl + "\n\tlisten [::]:443 quic;" + http_ssl = http_ssl + "\n\thttp2 on;" + else: + http_ssl = "\n\tlisten 443 ssl http2;" + http_ssl = http_ssl + "\n\tlisten [::]:443 ssl http2;" + conf = conf.replace(listen, listen + http_ssl) diff --git a/plugins/php/install.sh b/plugins/php/install.sh index 692b6acb5..16f66fbe8 100755 --- a/plugins/php/install.sh +++ b/plugins/php/install.sh @@ -63,7 +63,7 @@ if [ "${action}" == "install" ] && [ -d ${serverPath}/php/${type} ];then # cd /www/server/mdserver-web/plugins/php/versions/common && bash intl.sh install 73 # cd /www/server/mdserver-web/plugins/php/versions/common && bash gd.sh install 56 # cd /www/server/mdserver-web/plugins/php/versions/common && bash openssl.sh install 56 - # cd /www/server/mdserver-web/plugins/php/versions/common && bash sodium.sh install 81 + # cd /www/server/mdserver-web/plugins/php/versions/common && bash fileinfo.sh install 81 cd ${rootPath}/plugins/php/versions/common && bash gd.sh install ${type} cd ${rootPath}/plugins/php/versions/common && bash iconv.sh install ${type} cd ${rootPath}/plugins/php/versions/common && bash exif.sh install ${type} diff --git a/plugins/php/versions/all_test.sh b/plugins/php/versions/all_test.sh index 9584fcfeb..2dd50670a 100644 --- a/plugins/php/versions/all_test.sh +++ b/plugins/php/versions/all_test.sh @@ -39,7 +39,7 @@ for PHP_VER in ${PHP_VER_LIST[@]}; do done cd $DIR -PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81 82) +PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81 82 83) # yar PHP_EXT_LIST=(ZendGuardLoader pdo mysqlnd sqlite3 openssl opcache mcrypt fileinfo \ exif gd intl pcntl memcache memcached redis imagemagick xdebug \ diff --git a/plugins/php/versions/common/fileinfo.sh b/plugins/php/versions/common/fileinfo.sh index 4e7871c90..e0a481d17 100755 --- a/plugins/php/versions/common/fileinfo.sh +++ b/plugins/php/versions/common/fileinfo.sh @@ -37,6 +37,8 @@ else BAK='' fi +OSNAME=`cat ${rootPath}/data/osname.pl` + Install_lib() { @@ -59,6 +61,7 @@ Install_lib() OPTIONS="$OPTIONS --build=aarch64-unknown-linux-gnu --host=aarch64-unknown-linux-gnu" fi + $serverPath/php/$version/bin/phpize ./configure --with-php-config=$serverPath/php/$version/bin/php-config $OPTIONS @@ -66,7 +69,6 @@ Install_lib() # It is considered as a temporary bug if [ "$version" == "81" ] || [ "$version" == "82" ];then bash ${rootPath}/scripts/getos.sh - OSNAME=`cat ${rootPath}/data/osname.pl` if [ "$OSNAME" == 'centos' ];then FILE_softmagic=$sourcePath/php${version}/ext/${LIBNAME}/libmagic/softmagic.c FIND_UNDEF_STRNDUP=`cat $FILE_softmagic|grep '#undef strndup'` @@ -81,6 +83,11 @@ Install_lib() sed -i $BAK 's/CFLAGS \=/CFLAGS \= -std=gnu99/g' Makefile fi + if [ "$version" -gt "80" ] && [ "$OSNAME" == 'centos' ];then + sed -i $BAK "s#CFLAGS = -g -O2#CFLAGS = -std=c99 -g#g" $sourcePath/php${version}/ext/${LIBNAME}/Makefile + fi + + make clean && make && make install && make clean if [ -d $sourcePath/php${version} ];then diff --git a/requirements.txt b/requirements.txt index 828d31e9d..b747f00e1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ setuptools>=33.1.1 Werkzeug>=1.0.1,<3.0.0 wheel>=0.37.1 -gunicorn==20.1.0 +gunicorn==22.0.0 requests>=2.27.1 urllib3>=1.21.1 flask>=2.0.3,<3.0.0 diff --git a/version/r3.6.txt b/version/r3.6.txt index 73def1be8..84c406e11 100644 --- a/version/r3.6.txt +++ b/version/r3.6.txt @@ -2,4 +2,5 @@ cryptography==36.0.1 flask==2.0.3 pyOpenSSL==22.0.0 requests==2.27.1 -gevent==22.10.2 \ No newline at end of file +gevent==22.10.2 +gunicorn==21.2.0 \ No newline at end of file diff --git a/version/r3.7.txt b/version/r3.7.txt index 49020ffd7..b11b01dba 100644 --- a/version/r3.7.txt +++ b/version/r3.7.txt @@ -1,2 +1,3 @@ urllib3==1.21.1 -gevent==22.10.2 \ No newline at end of file +gevent==22.10.2 +gunicorn==21.2.0 \ No newline at end of file