From a660dc95bc8791f220e64208af9f6eb9926b8ce8 Mon Sep 17 00:00:00 2001 From: shy Date: Fri, 1 Jul 2022 14:52:01 +0800 Subject: [PATCH] opt some --- etc/conf/nginx.conf | 12 +++++++++++- etc/miss.sh | 5 ++--- src/main.shy | 4 ++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/etc/conf/nginx.conf b/etc/conf/nginx.conf index 07fd372c..1376c4b3 100644 --- a/etc/conf/nginx.conf +++ b/etc/conf/nginx.conf @@ -44,7 +44,17 @@ http { server { listen 80; server_name shylinux.com; - location / { return 302 https://shylinux.com/; } + + location / { + proxy_set_header X-HOST $scheme://$http_host; + proxy_set_header X-Real-Port $remote_port; + proxy_set_header X-Real-IP $remote_addr; + if ($http_user_agent ~* "^Wget") { + proxy_pass http://127.0.0.1:9020; + break; + } + return 302 https://shylinux.com/; + } } server { diff --git a/etc/miss.sh b/etc/miss.sh index f0a15e93..5caf995f 100644 --- a/etc/miss.sh +++ b/etc/miss.sh @@ -1,8 +1,7 @@ #!/bin/bash -[ -f $PWD/.ish/plug.sh ] || [ -f $HOME/.ish/plug.sh ] || git clone ${ISH_CONF_HUB_PROXY:="https://"}shylinux.com/x/intshell $PWD/.ish -if [ "$ISH_CONF_PRE" = "" ]; then - source $PWD/.ish/plug.sh || source $HOME/.ish/plug.sh +require &>/dev/null || if [ -f $PWD/.ish/plug.sh ]; then source $PWD/.ish/plug.sh; elif [ -f $HOME/.ish/plug.sh ]; then source $HOME/.ish/plug.sh; else + ctx_temp=$(mktemp); if curl -h &>/dev/null; then curl -o $ctx_temp -fsSL https://shylinux.com; else wget -O $ctx_temp -q http://shylinux.com; fi; source $ctx_temp intshell fi require sys/cli/file.sh diff --git a/src/main.shy b/src/main.shy index d8d78a25..5f3a0c89 100644 --- a/src/main.shy +++ b/src/main.shy @@ -42,3 +42,7 @@ source "../usr/icebergs/misc/node/vue.shy" source "../usr/icebergs/misc/java/spring.shy" source "../usr/icebergs/core/chat/oauth/oauth.shy" +label ` +Windows MacOSX Linux iOS Android +c/c++ golang python java javascript +`