aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorshu <nvcsadjkojf@outlook.com>2026-10-30 15:55:23 +0800
committershu <nvcsadjkojf@outlook.com>2026-10-30 15:55:23 +0800
commit67b495cc269d5777485ae542bf389ccb630886e9 (patch)
tree2b300c6e0549cf6921b2c0eea9c2a7a209641d89 /scripts
parent3d12f6ebbda9baa3d8d0646daf298718c8548579 (diff)
补充 fnm shell 提示最新写法;补充 vscode plantuml 设置;调整系统服务文件;调整开发环境配置方式。
Diffstat (limited to 'scripts')
-rw-r--r--scripts/11_system.sh90
-rwxr-xr-xscripts/51_dev.sh9
2 files changed, 11 insertions, 88 deletions
diff --git a/scripts/11_system.sh b/scripts/11_system.sh
index fdd7e16..947194b 100644
--- a/scripts/11_system.sh
+++ b/scripts/11_system.sh
@@ -22,97 +22,13 @@ setup_vconsole_font() {
}
setup_shadowsocks() {
- sudo cat > /etc/shadowsocks-rust/s.json <<EOF
-{
- "server": "x.xxx",
- "server_port": 1111,
- "password": "xxxxxxxxxxxxxxxx",
- "timeout": 300,
- "method": "aes-256-gcm",
- "locals": [
- {
- "local_address": "127.0.0.1",
- "local_port": 1080
- },
- {
- "local_address": "127.0.0.1",
- "local_port": 3128,
- "protocol": "http"
- }
- ]
-}
-EOF
-
+ sudo cp -rf $ETC_DIR/shadowsocks-rust/s.json /etc/shadowsocks-rust/s.json
sudo systemctl enable --now shadowsocks-rust@s
}
setup_dae() {
- sudo cat > /etc/dae/config.dae <<EOF
-global {
- wan_interface: auto
- auto_config_kernel_parameter: true
- log_level: info
-
- # Keep the original domain when dialing through the proxy. This also makes
- # domain-based routing independent from the IP returned by the local DNS.
- dial_mode: domain
- allow_insecure: false
-}
-
-# Reuse the local Shadowsocks SOCKS5 listener instead of duplicating the
-# remote server address and password in this configuration.
-node {
- # local_ss: 'socks5://127.0.0.1:8888'
-
- # Direct Shadowsocks node example using the SIP002 URI format. Replace the
- # cipher, password, host, and port, then uncomment it. Base64 is encoding,
- # not encryption, so keep the real link under secret/.
- # example_ss: 'ss://YWVzLTEyOC1nY206dGVzdA@example.com:8388#example-ss'
- ss: 'ss://aes-256-gcm:xxxxxxxxxx@xxxx:1234'
-}
-
-group {
- proxy {
- filter: name(ss)
- policy: fixed(0)
- }
-}
-
-# Let dae observe DNS queries so that routing rules can match domain names.
-dns {
- upstream {
- router: 'udp://192.168.8.1:53'
- direct_dns: 'tcp+udp://223.5.5.5:53'
- }
-
- routing {
- request {
- qname(suffix: l) -> router
- qname(suffix: lan) -> router
- fallback: direct_dns
- }
-
- response {
- fallback: accept
- }
- }
-}
-
-routing {
- # Shadowsocks must reach its remote server directly to avoid a proxy loop.
- pname(sslocal) -> direct
-
- # Keep local, multicast, and other private destinations direct.
- dip(224.0.0.0/3, 'ff00::/8') -> direct
- dip(geoip:private) -> direct
-
- # Route mainland China IPs directly. Everything else uses the proxy, so
- # overseas destinations do not need to be maintained in a domain list.
- dip(geoip:cn) -> direct
-
- fallback: proxy
-}
-EOF
+ sudo cp -rf $ETC_DIR/dae/config.dae /etc/dae/config.dae
+ sudo systemctl enable --now dae
}
setup_modem() {
diff --git a/scripts/51_dev.sh b/scripts/51_dev.sh
index 10cf726..871ce1a 100755
--- a/scripts/51_dev.sh
+++ b/scripts/51_dev.sh
@@ -1,12 +1,19 @@
#/bin/bash
CURRENT_VERSION=24
-FNM_NODE_DIST_MIRROR=https://mirrors.nju.edu.cn/nodejs-release/
+export FNM_NODE_DIST_MIRROR=https://mirrors.nju.edu.cn/nodejs-release/
+export RUSTUP_UPDATE_ROOT=https://mirror.nju.edu.cn/rustup/rustup
+export RUSTUP_DIST_SERVER=https://mirror.nju.edu.cn/rustup
fnm install $CURRENT_VERSION
fnm use $CURRENT_VERSION
+
+export PATH=$HOME/.local/npm/bin:$PATH
npm i -g pnpm
+
pnpm setup
+export PATH=$HOME/.local/share/pnpm/bin:$PATH
pnpm i -g serve tiddlywiki @deepseek-ai/dsh
+rustup toolchain install stable
rustup default stable \ No newline at end of file