windows初始化开发环境

# 字体: JetBrainsMono Nerd Font
https://github.com/ryanoasis/nerd-fonts/releases/download/v3.4.0/JetBrainsMono.zip
# 安装v2rayA核心网页端
winget install --id v2rayA.v2rayA --source winget
# 安装ProxyBridge全局代理(需要先配置代理规则全局且排除v2ray自身)
https://github.com/InterceptSuite/ProxyBridge

# 常用软件,安装之后新开Terminal环境生效
# https://winstall.app/
winget install --id Microsoft.VisualStudioCode --source winget
winget install --id Git.Git --source winget
# C:\Program Files\BellSoft\LibericaJDK-17\bin
winget install --id BellSoft.LibericaJDK.17 --source winget
winget install --id OpenJS.NodeJS.20 --source winget
winget install --id frippery.busybox-w32 --source winget
winget install --id AdGuard.AdGuardHome --source winget
winget install --id DBeaver.DBeaver.Community --source winget --proxy http://127.0.0.1:20171
winget install --id ZeroTier.ZeroTierOne --source winget --proxy http://127.0.0.1:20171
winget install --id marlocarlo.pstop --source winget --proxy http://127.0.0.1:20171
winget install --id arndawg.tmux-windows --source winget --proxy http://127.0.0.1:20171

InterceptSuite.ProxyBridge
xanderfrangos.twinkletray
7zip.7zip
KDE.KDEConnect
zhongyang219.TrafficMonitor.Full
# 修改ctrl+空格 不切换输入法, 管理员执行 SetInputSwitch.bat
# https://github.com/rime/weasel/issues/1065
Rime.Weasel
Valve.Steam
aria2.aria2

# 安装wsl2子系统
## 关闭子系统的dns端口占用
code %USERPROFILE%\.wslconfig
[wsl2]
dnsTunneling=false
localhostForwarding=true


# wsl --list --online
# wsl --install Ubuntu-24.04
# wsl --set-default Ubuntu-24.04
# wsl -l -v
# wsl --shutdown

# wls2手动下载安装
https://github.com/microsoft/WSL/releases/download/2.6.3/wsl.2.6.3.0.x64.msi
# ubuntu-24.04.3
https://mirrors-i.tuna.tsinghua.edu.cn/ubuntu-releases/noble/ubuntu-24.04.3-wsl-amd64.wsl
# 一键换源
bash <(curl -sSL https://linuxmirrors.cn/main.sh)


# 开启 PSReadLine 先开启脚本运行, 管理员打开powershell
Set-ExecutionPolicy RemoteSigned
# 修改文件
code $PROFILE
Import-Module PSReadLine


# 配置tmux
tmux set-option -g default-shell "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe"

# 显示占用和监控
https://github.com/zhongyang219/TrafficMonitor/releases/tag/V1.85.1
# 输入法
https://github.com/iDvel/rime-ice/releases/download/2026.03.26/full.zip
# 鼠标指针 Bibata-Modern-Classic-Regular-Windows
https://github.com/ful1e5/Bibata_Cursor/releases/download/v2.0.7/Bibata-Modern-Classic-Windows.zip
# 优化alt+tab 只美化了,不支持最小化的窗口跳过
https://github.com/MrBeanCpp/AltTaber

注册服务到windows https://nssm.cc/download

https://github.com/jcleng/filearchive/releases/download/202603310302_nssm-2.24.zip/nssm-2.24.zip
https://github.com/fightroad/nssm/releases/download/2.25/nssm-win64-Release.zip
# 管理员运行cmd
# 注册AdGuardHome服务, 并到服务开启开开机启动
nssm.exe install nssmAdGuardHome
# C:/Users/jcleng/AppData/Local/Microsoft/WinGet/Packages/AdGuard.AdGuardHome_Microsoft.Winget.Source_8wekyb3d8bbwe/AdGuardHome/AdGuardHome.exe
nssm.exe start nssmAdGuardHome
  • ProxyBridge-Rules.json

[
  {
    "processNames": "openp2p.exe",
    "targetHosts": "*",
    "targetPorts": "*",
    "protocol": "TCP",
    "action": "DIRECT",
    "enabled": true
  },
  {
    "processNames": "kdeconnect-app.exe",
    "targetHosts": "*",
    "targetPorts": "*",
    "protocol": "TCP",
    "action": "DIRECT",
    "enabled": true
  },
  {
    "processNames": "v2raya.exe",
    "targetHosts": "*",
    "targetPorts": "*",
    "protocol": "TCP",
    "action": "DIRECT",
    "enabled": true
  },
  {
    "processNames": "v2ray.exe",
    "targetHosts": "*",
    "targetPorts": "*",
    "protocol": "TCP",
    "action": "DIRECT",
    "enabled": true
  },
  {
    "processNames": "*",
    "targetHosts": "*",
    "targetPorts": "*",
    "protocol": "TCP",
    "action": "PROXY",
    "enabled": true
  },
  {
    "processNames": "kdeconnectd.ex.exe",
    "targetHosts": "*",
    "targetPorts": "*",
    "protocol": "TCP",
    "action": "DIRECT",
    "enabled": true
  },
  {
    "processNames": "svchost.exe",
    "targetHosts": "*",
    "targetPorts": "*",
    "protocol": "TCP",
    "action": "DIRECT",
    "enabled": true
  }
]
  • nssmEasytierbat执行文件

@echo off
E:\soft\easytier-windows-x86_64\easytier-core.exe ^
--network-name jxxxt ^
--network-secret jxxxxss ^
--machine-id 2026033022463306 ^
--private-mode true ^
--latency-first ^
--disable-udp-hole-punching ^
--disable-ipv6 ^
--multi-thread ^
--dev-name easytier ^
-i 10.10.11.71/24 ^
--disable-p2p ^
-p tcp://ros.scpsl.com.cn:11010
pause
  • 指定端口转发

# 管理员执行
netsh interface portproxy add v4tov4 listenport=8507 listenaddress=0.0.0.0 connectport=8505 connectaddress=172.29.223.231 protocol=tcp
netsh interface portproxy show v4tov4