Files
ykxmz/_build/setup_gitee.ps1
T
xmz7891 b705216e4a ykxmz 1.5.0锛氫慨澶嶆墜琛ㄧ TLS 璇佷功鏍¢獙 + MTU 淇缃戠粶绋冲畾鎬?
琚帶绔?- 淇 MTU 闂锛氬す MSS + 璺緞 MTU 鎺㈡祴锛堝叕缃戝彲鐢ㄧ巼 48% -> 100%锛?- 澶嶇敤 HTTP 杩炴帴锛堝厤鎺夋瘡娆℃柊寤?TLS 鐨?30% 鎻℃墜澶辫触锛?- 姣忓垎閽熷洖澶存壘灞€鍩熺綉锛岃嚜鍔ㄥ垏鍥炲揩 400 鍊嶇殑璺緞
- 鐢婚潰蹇冭烦甯э細闈欐鏃剁渷娴侀噺锛屽鎴风浠嶇煡閬撴祦鏄椿鐨?- 閿佸睆鏃剁粰鍑哄彲鎿嶄綔鐨勬彁绀?
鎵嬭〃绔?- 鍐呯疆 GTS Root R4 / GlobalSign Root CA锛屼慨 SSLHandshakeException
- 杩炴帴閿欒缈昏瘧鎴愪汉璇濓紙璇佷功/鏃堕棿/瑙f瀽/瓒呮椂鍒嗗埆鎻愮ず锛?- 缁忎腑杞繛涓婂悗鐢ㄦ湇鍔″櫒鎶ョ殑鍦板潃鍒锋柊宸查厤瀵硅褰?- 鏂板灞€鍩熺綉杩炴帴椤甸潰銆佹湇鍔″櫒寤惰繜妫€娴?
鏈嶅姟鍣ㄧ
- 鏀寔 chunked 璇锋眰浣擄紙淇瘡 16 绉掍竴娆$殑杩炴帴閿欎贡涓庡ぇ闈㈢Н 502锛?- 缃戠粶璋冧紭鑴氭湰 net-tune.sh锛堝紑鏈鸿嚜鍔ㄥ簲鐢級
- 绠$悊椤碉細鎵归噺鍒犻櫎銆佺綉缁滀綋妫€銆佷笅杞藉尯
- 闅ч亾鏀?HTTP/2 + 鍙岃繛鎺?
鏂囨。
- 璁稿彲鍗忚 / 瀹夎鍓嶅繀璇?/ 瀹夎鍚庨』鐭ワ紙浣滆€咃細灏忛害瀛愶級
2026-10-06 19:01:05 +08:00

126 lines
3.7 KiB
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 配置 Gitee 仓库:生成 SSH 密钥 + 建 .gitignore + 初始化提交
# 用法: powershell -NoProfile -ExecutionPolicy Bypass -File _build\setup_gitee.ps1
$ErrorActionPreference = "Continue"
$git = "C:\Program Files\Git\bin\git.exe"
$root = "C:\Users\shu\Desktop\deepseekagent\LanRemote"
$sshDir = Join-Path $env:USERPROFILE ".ssh"
Set-Location $root
Write-Host ""
Write-Host "===== 1. 生成 SSH 密钥(如果没有)=====" -ForegroundColor Cyan
if (-not (Test-Path $sshDir)) { New-Item -ItemType Directory -Path $sshDir -Force | Out-Null }
$keyPath = Join-Path $sshDir "id_ed25519_gitee"
if (Test-Path $keyPath) {
Write-Host " 密钥已存在: $keyPath"
} else {
& "$env:ProgramFiles\Git\usr\bin\ssh-keygen.exe" -t ed25519 -C "ykxmz-gitee" -f $keyPath -N '""' 2>&1 | Out-Null
if (Test-Path $keyPath) { Write-Host " ✓ 已生成 $keyPath" } else { Write-Host " ✗ 生成失败" -ForegroundColor Red }
}
Write-Host ""
Write-Host "===== 2. 配置 SSH(让 gitee.com 用这个密钥)=====" -ForegroundColor Cyan
$sshConfig = Join-Path $sshDir "config"
$marker = "# ykxmz-gitee"
$existing = if (Test-Path $sshConfig) { Get-Content $sshConfig -Raw } else { "" }
if ($existing -notmatch [regex]::Escape($marker)) {
$block = @"
$marker
Host gitee.com
HostName gitee.com
User git
IdentityFile $($keyPath -replace '\\','/')
IdentitiesOnly yes
StrictHostKeyChecking accept-new
"@
Add-Content -Path $sshConfig -Value $block -Encoding UTF8
Write-Host " 已写入 $sshConfig"
} else {
Write-Host " SSH 配置已存在"
}
Write-Host ""
Write-Host "===== 3. 建 .gitignore =====" -ForegroundColor Cyan
$ignore = @'
# ---- 构建产物(不提交,release 里单独发)----
/dist/
/dist_exe/
/_build/jc*/
/_build/out*/
/_build/*.png
/_build/icon_source.png
/_build/icon_preview.png
/_build/admin_preview*.png
/_build/ui_preview.png
/_build/_unit.txt
/_tests/out_java/
/_tests/out_app/
/_tests/received/
/_tests/_stubdata/
/_tests/shots/
# ---- Python ----
__pycache__/
*.py[cod]
*.egg-info/
.venv/
venv/
# ---- 编辑器 / 系统 ----
.vscode/
.idea/
*.swp
Thumbs.db
desktop.ini
.DS_Store
# ---- 其它 ----
*.log
*.tmp
'@
Set-Content -Path (Join-Path $root ".gitignore") -Value $ignore -Encoding UTF8
Write-Host " 已写入 .gitignore"
Write-Host ""
Write-Host "===== 4. git 初始化 =====" -ForegroundColor Cyan
if (-not (Test-Path (Join-Path $root ".git"))) {
& $git init -q -b main 2>&1 | Out-Null
Write-Host " ✓ git init"
} else {
Write-Host " 仓库已存在"
}
& $git config user.name "xmz7891" 2>&1 | Out-Null
& $git config user.email "xmz7891@gitee.com" 2>&1 | Out-Null
& $git config core.quotepath false 2>&1 | Out-Null
& $git config core.autocrlf false 2>&1 | Out-Null
Write-Host " ✓ 配置完成"
Write-Host ""
Write-Host "===== 5. 加 remote =====" -ForegroundColor Cyan
$remotes = & $git remote 2>&1
if ($remotes -notcontains "origin") {
& $git remote add origin "git@gitee.com:xmz7891/ykxmz.git" 2>&1 | Out-Null
Write-Host " ✓ origin = git@gitee.com:xmz7891/ykxmz.git"
} else {
Write-Host " origin 已存在: $(& $git remote get-url origin)"
}
Write-Host ""
Write-Host "===== 6. 待提交文件统计 =====" -ForegroundColor Cyan
& $git add -A 2>&1 | Out-Null
$staged = (& $git diff --cached --name-only 2>&1)
Write-Host " 暂存文件数: $($staged.Count)"
$size = 0
foreach ($f in $staged) {
$p = Join-Path $root $f
if (Test-Path $p -PathType Leaf) { $size += (Get-Item $p).Length }
}
Write-Host " 总体积: $([math]::Round($size/1MB,2)) MB"
Write-Host ""
Write-Host "===== 7. 你的公钥(要加到 Gitee)=====" -ForegroundColor Yellow
if (Test-Path "$keyPath.pub") {
Get-Content "$keyPath.pub" | ForEach-Object { Write-Host " $_" -ForegroundColor White }
}