1
0
forked from x/ContextOS
This commit is contained in:
shylinux 2023-02-17 22:14:41 +08:00
parent e280e63886
commit 9dc30e4f0c
7 changed files with 68 additions and 42 deletions

View File

@ -1,18 +1,8 @@
ssl_session_timeout 30m;
ssl_session_cache shared:SSL:1m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
client_max_body_size 100m;
client_body_timeout 300s;
client_body_in_file_only clean;
client_body_buffer_size 16K;
client_body_temp_path /tmp/nginx/client_body_temp;
location / { location / {
include header.conf; include header.conf;
if ($http_user_agent ~* "^Mozilla") {
return 302 https://$server_name/$request_uri;
}
proxy_pass http://contexts; proxy_pass http://contexts;
} }

View File

@ -1,9 +1,29 @@
ssl_session_timeout 30m;
ssl_session_cache shared:SSL:1m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
client_max_body_size 100m;
client_body_timeout 300s;
client_body_in_file_only clean;
client_body_buffer_size 16K;
client_body_temp_path /tmp/nginx/client_body_temp;
location / { location / {
include header.conf; include header.conf;
if ($http_user_agent ~* "^Wget") { proxy_pass http://contexts;
proxy_pass http://contexts;
break;
}
return 302 https://$server_name/;
} }
location /space/ {
include header.conf;
proxy_pass http://contexts;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
}
location /x/ {
include header.conf;
proxy_pass http://contexts_repos;
}

View File

@ -24,12 +24,12 @@ http {
server { server {
listen 80; listen 80;
server_name shylinux.com; server_name shylinux.com;
include locations.conf; include location.conf;
} }
server { server {
listen 443 ssl; listen 443 ssl;
server_name shylinux.com; server_name shylinux.com;
include location.conf; include locations.conf;
ssl_certificate_key 8293704_shylinux.com.key; ssl_certificate_key 8293704_shylinux.com.key;
ssl_certificate 8293704_shylinux.com.pem; ssl_certificate 8293704_shylinux.com.pem;
@ -38,12 +38,12 @@ http {
server { server {
listen 80; listen 80;
server_name contexts.com.cn; server_name contexts.com.cn;
include locations.conf; include location.conf;
} }
server { server {
listen 443 ssl; listen 443 ssl;
server_name contexts.com.cn; server_name contexts.com.cn;
include location.conf; include locations.conf;
ssl_certificate_key 7424713_contexts.com.cn.key; ssl_certificate_key 7424713_contexts.com.cn.key;
ssl_certificate 7424713_contexts.com.cn.pem; ssl_certificate 7424713_contexts.com.cn.pem;

16
go.mod
View File

@ -13,21 +13,7 @@ require (
require ( require (
shylinux.com/x/gogit v0.0.7 shylinux.com/x/gogit v0.0.7
shylinux.com/x/ice v1.2.7 shylinux.com/x/ice v1.2.7
shylinux.com/x/icebergs v1.5.2 shylinux.com/x/icebergs v1.5.1
shylinux.com/x/toolkits v0.7.3 shylinux.com/x/toolkits v0.7.3
shylinux.com/x/webview v0.0.2 shylinux.com/x/webview v0.0.2
) )
replace (
shylinux.com/x/ice => ./usr/release
shylinux.com/x/icebergs => ./usr/icebergs
shylinux.com/x/toolkits => ./usr/toolkits
)
replace (
shylinux.com/x/golang-story => ./usr/golang-story
shylinux.com/x/linux-story => ./usr/linux-story
shylinux.com/x/mysql-story => ./usr/mysql-story
shylinux.com/x/nginx-story => ./usr/nginx-story
shylinux.com/x/redis-story => ./usr/redis-story
)

18
go.sum
View File

@ -2,12 +2,26 @@ shylinux.com/x/creackpty v0.0.2 h1:1ekWD5zeKZiQZCYvKSkHnm819wryZxzoq3kmvheC7bA=
shylinux.com/x/creackpty v0.0.2/go.mod h1:SOsAaW5FdicXUprrxgENk2JP1f8LdHBXZjqOFot488o= shylinux.com/x/creackpty v0.0.2/go.mod h1:SOsAaW5FdicXUprrxgENk2JP1f8LdHBXZjqOFot488o=
shylinux.com/x/go-qrcode v0.0.2 h1:/c0PLj+1RT+kUPfnZVXwgbgH5m1SxBUjM2MIKXbDk+E= shylinux.com/x/go-qrcode v0.0.2 h1:/c0PLj+1RT+kUPfnZVXwgbgH5m1SxBUjM2MIKXbDk+E=
shylinux.com/x/go-qrcode v0.0.2/go.mod h1:TlzGBENHXy19xC3AsC6h4Vs5fx2ZuDA4TZ0U3C2OeK4= shylinux.com/x/go-qrcode v0.0.2/go.mod h1:TlzGBENHXy19xC3AsC6h4Vs5fx2ZuDA4TZ0U3C2OeK4=
shylinux.com/x/go-sql-mysql v0.0.1 h1:VX5SrwLBKzfkRouj39LgJ9reIXOWmMsScRpr+e0qdp0=
shylinux.com/x/go-sql-mysql v0.0.1/go.mod h1:47OfAZK24HRJMy7dAu/jrksGCf9yzJaAUFwWYjhDFDA=
shylinux.com/x/go-sql-mysql v0.0.2 h1:XcsMEF3KnFmRu6EmxIwIF6M1o2tD1NQvel3U9m+1Ap4= shylinux.com/x/go-sql-mysql v0.0.2 h1:XcsMEF3KnFmRu6EmxIwIF6M1o2tD1NQvel3U9m+1Ap4=
shylinux.com/x/go-sql-mysql v0.0.2/go.mod h1:lHjRMZz5Lii6U+49fhkbCWgsnL+yux54SYJYWqASN8Y= shylinux.com/x/go-sql-mysql v0.0.2/go.mod h1:lHjRMZz5Lii6U+49fhkbCWgsnL+yux54SYJYWqASN8Y=
shylinux.com/x/gogit v0.0.7 h1:2ep5QpXWLs0UBCywJuUHda/aagskYvFmn0nj3vpEdY4= shylinux.com/x/gogit v0.0.7 h1:2ep5QpXWLs0UBCywJuUHda/aagskYvFmn0nj3vpEdY4=
shylinux.com/x/gogit v0.0.7/go.mod h1:wYfHxpQT1C8yNV+yC1jStIy0I12bfUCyJARhn0sNn1M= shylinux.com/x/gogit v0.0.7/go.mod h1:wYfHxpQT1C8yNV+yC1jStIy0I12bfUCyJARhn0sNn1M=
shylinux.com/x/golang-story v0.5.7 h1:Vzfa4EWy3I4CFXICUHQLnxmmDdv9Sye1AdyT6P1eBCg=
shylinux.com/x/golang-story v0.5.7/go.mod h1:2FV/6fLo5/M6byd1eETrG0de9gfA5DvLCYXP0nT+DQM=
shylinux.com/x/ice v1.2.7 h1:os/TJjKx5YXucQRQD9/HchNSHi+oyheaq5q5gB6g+Xg=
shylinux.com/x/ice v1.2.7/go.mod h1:vTALHrKmHOvxDajsbmNsXh9ogIq1RIvBKJM4wDyyhe4=
shylinux.com/x/icebergs v1.5.1 h1:kWBIKbkV9FDg81dY5xl8PcqA9UX3V0zpyDklMw68WZQ=
shylinux.com/x/icebergs v1.5.1/go.mod h1:tyatkO1j/uIN/CO6E6SweEoDv3mTRTwugAFyJju1Kws=
shylinux.com/x/linux-story v0.5.4 h1:L2+qbUT6DGkg1wwY5yPyxy0MikVzbjlowlA369YxDWw=
shylinux.com/x/linux-story v0.5.4/go.mod h1:nm+nXsgvGKXCpNT5K31GtRFVTinevtuUu+1nFtJbZ20=
shylinux.com/x/mysql-story v0.5.7 h1:62BGm7s6qvad7SI+6L08uF44+l0YV6mG+QtFlb7OhiE=
shylinux.com/x/mysql-story v0.5.7/go.mod h1:is88aTgLsGGUSLGT4PQorwIcvwvb2fTgDLvFRlc6Uds=
shylinux.com/x/nginx-story v0.5.7 h1:QLh9HslOzlpi/2BdWFX2QZCyz4Z2hRV/bD4xaeEbbeA=
shylinux.com/x/nginx-story v0.5.7/go.mod h1:OKgJu5Y8mgQCIw9TtR7ijp2grTkq1LBU+4gWWJg47aM=
shylinux.com/x/redis-story v0.5.8 h1:1MGebd/6YMFGULvPgcroEr2kLcSuLy1YHjisR8TpuDg=
shylinux.com/x/redis-story v0.5.8/go.mod h1:5PAglQTnrWoCzog5RrQTtmQTH4feKEJIYon6t0tfr2g=
shylinux.com/x/toolkits v0.7.3 h1:yeiYnUTpF3CUDTSlqiy56LWfd+CkdrLQvD2fe0kAHzQ=
shylinux.com/x/toolkits v0.7.3/go.mod h1:8LbYHe7oxBIqb6s4MSOD+4d28QvPdvkyCVtwB/JW7AA=
shylinux.com/x/websocket v0.0.2 h1:aeeZyAsh6QN7+l5oMXlO9/rlQgx6CHvDtpZyAqMCSlU= shylinux.com/x/websocket v0.0.2 h1:aeeZyAsh6QN7+l5oMXlO9/rlQgx6CHvDtpZyAqMCSlU=
shylinux.com/x/websocket v0.0.2/go.mod h1:yMcu4XS6JB11YRISXwvubh7dPM6rWPdzIRv0CrshQBY= shylinux.com/x/websocket v0.0.2/go.mod h1:yMcu4XS6JB11YRISXwvubh7dPM6rWPdzIRv0CrshQBY=
shylinux.com/x/webview v0.0.2 h1:T0f2sDdiMCdDPjYwD1WS64ASBGwvZKPZkxDQ84d+ZQs= shylinux.com/x/webview v0.0.2 h1:T0f2sDdiMCdDPjYwD1WS64ASBGwvZKPZkxDQ84d+ZQs=

View File

@ -1,2 +1,19 @@
echo "hello world" main() {
echo "$@" case "$1" in
app) # 生产环境
export ctx_log=${ctx_log:=/dev/stdout}
shift && prepare_ice && bin/ice.bin forever start dev dev "$@"
;;
dev) # 开发环境
shift && prepare_package && source etc/miss.sh "$@"
;;
cmd) # 命令环境
ish_sys_dev_init >/dev/null
shift; [ -n "$*" ] && ish_sys_dev_run "$@"
;;
*)
;;
esac
}
main "$@"

View File

@ -1 +0,0 @@
<svg vertion="1.1" xmlns="https://www.w3.org/2000/svg" text-anchor="middle" dominant-baseline="middle" height="385" width="750" count="19" pid="p19" grid="10" stroke-width="2" stroke="yellow" fill="purple" font-size="24"><g><rect height="40" width="120" ry="4" rx="4" x="300" y="40" pid="p1" class="p1" text="p2" ship="[{&quot;pid&quot;:&quot;p7&quot;,&quot;which&quot;:1,&quot;anchor&quot;:8},{&quot;pid&quot;:&quot;p8&quot;,&quot;which&quot;:1,&quot;anchor&quot;:8},{&quot;pid&quot;:&quot;p9&quot;,&quot;which&quot;:1,&quot;anchor&quot;:8},{&quot;pid&quot;:&quot;p10&quot;,&quot;which&quot;:1,&quot;anchor&quot;:8}]" index="cli.system" args="pwd"></rect><text x="360" y="60" pid="p2" class="p2">shy</text></g><rect height="40" width="120" ry="4" rx="4" x="490" y="160" text="p5" ship="[{&quot;pid&quot;:&quot;p10&quot;,&quot;which&quot;:2,&quot;anchor&quot;:2}]" pid="p19" class="p19" index="web.route"></rect><rect height="40" width="120" ry="4" rx="4" x="300" y="160" text="p4" ship="[{&quot;pid&quot;:&quot;p9&quot;,&quot;which&quot;:2,&quot;anchor&quot;:2},{&quot;pid&quot;:&quot;p14&quot;,&quot;which&quot;:1,&quot;anchor&quot;:8},{&quot;pid&quot;:&quot;p15&quot;,&quot;which&quot;:1,&quot;anchor&quot;:8},{&quot;pid&quot;:&quot;p16&quot;,&quot;which&quot;:1,&quot;anchor&quot;:8}]" pid="p17" class="p17" index="cli.runtime"></rect><rect height="40" width="120" ry="4" rx="4" x="110" y="160" text="p3" ship="[{&quot;pid&quot;:&quot;p8&quot;,&quot;which&quot;:2,&quot;anchor&quot;:2}]" pid="p18" class="p18"></rect><text x="170" y="180" pid="p3" class="p3">old</text><text x="360" y="180" pid="p4" class="p4">dev</text><text x="550" y="180" pid="p5" class="p5">com</text><g></g><line x1="360" y1="80" x2="360" y2="80" ship="[{&quot;pid&quot;:&quot;p1&quot;},{&quot;pid&quot;:&quot;&quot;}]" pid="p7" class="p7"></line><line x1="360" y1="80" x2="170" y2="160" ship="[{&quot;pid&quot;:&quot;p1&quot;},{&quot;pid&quot;:&quot;&quot;}]" pid="p8" class="p8"></line><line x1="360" y1="80" x2="360" y2="160" ship="[{&quot;pid&quot;:&quot;p1&quot;},{&quot;pid&quot;:&quot;&quot;}]" pid="p9" class="p9"></line><line x1="360" y1="80" x2="550" y2="160" ship="[{&quot;pid&quot;:&quot;p1&quot;},{&quot;pid&quot;:&quot;&quot;}]" pid="p10" class="p10"></line><g class="mac" stroke-width="2" stroke="black" fill="cyan" font-size="24" style="opacity: 1; display: block;"><rect height="40" width="120" ry="4" rx="4" x="300" y="260" text="p11" ship="[{&quot;pid&quot;:&quot;p15&quot;,&quot;which&quot;:2,&quot;anchor&quot;:2}]"></rect><text x="360" y="280" pid="p11" class="p11">MB2</text><rect height="40" width="120" ry="4" rx="4" x="490" y="260" text="p13" ship="[{&quot;pid&quot;:&quot;p16&quot;,&quot;which&quot;:2,&quot;anchor&quot;:2}]"></rect><rect height="40" width="120" ry="4" rx="4" x="110" y="260" text="p12" ship="[{&quot;pid&quot;:&quot;p14&quot;,&quot;which&quot;:2,&quot;anchor&quot;:2}]"></rect><text x="170" y="280" pid="p12" class="p12">MB1</text><text x="550" y="280" pid="p13" class="p13">MB0</text><line x1="360" y1="200" x2="170" y2="260" ship="[{&quot;pid&quot;:&quot;&quot;},{&quot;pid&quot;:&quot;&quot;}]" pid="p14" class="p14"></line><line x1="360" y1="200" x2="360" y2="260" ship="[{&quot;pid&quot;:&quot;&quot;},{&quot;pid&quot;:&quot;&quot;}]" pid="p15" class="p15"></line><line x1="360" y1="200" x2="550" y2="260" ship="[{&quot;pid&quot;:&quot;&quot;},{&quot;pid&quot;:&quot;&quot;}]" pid="p16" class="p16"></line></g></svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB