This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dns: | |
| enable: true | |
| listen: :53 | |
| enhanced-mode: redir-host | |
| fake-ip-range: 198.18.0.1/16 | |
| fake-ip-filter-mode: blacklist | |
| prefer-h3: false | |
| respect-rules: true | |
| use-hosts: false | |
| use-system-hosts: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 查看防火墙状态 | |
| firewall-cmd --state | |
| # 查看防火墙是否开启ip地址转发(ip地址伪装) | |
| firewall-cmd --query-masquerade | |
| # 开启ip地址转发 | |
| firewall-cmd --add-masquerade --permanent | |
| # 将网络接口 docker0 加入 trusted zone,解决 DNS 问题 | |
| firewall-cmd --permanent --zone=trusted --add-interface=docker0 | |
| # 更新防火墙规则 | |
| firewall-cmd --reload |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function proxy { | |
| $env:http_proxy = "http://127.0.0.1:7890" | |
| $env:https_proxy = "http://127.0.0.1:7890" | |
| [System.Net.WebRequest]::DefaultWebProxy = New-Object System.Net.WebProxy ("http://127.0.0.1:7890") | |
| Write-Host "Proxy enabled: http://127.0.0.1:7890" -ForegroundColor Green | |
| } | |
| function unproxy { | |
| $env:http_proxy = $null | |
| $env:https_proxy = $null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select vdisk file="%USERPROFILE%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\ext4.vhdx" | |
| compact vdisk |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set-MpPreference -ScanPurgeItemsAfterDelay 2 | |
| # 其中的数字是在发现威胁后的多少天里清除 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| PROXY_HTTP="http://localhost:1080" | |
| docker build -f Dockerfile \ | |
| --network host \ | |
| --build-arg HTTP_PROXY=$PROXY_HTTP \ | |
| --build-arg HTTPS_PROXY=$PROXY_HTTP \ | |
| -t mytag:latest . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## blog:www.cnbuilder.cn | |
| ## create 2019-04-30 | |
| version="5.2.1"; | |
| appName=$2 | |
| if [ -z $appName ];then | |
| appName=`ls -t |grep .jar$ |head -n1` | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Remove-NetFirewallRule -DisplayName "WSL" | |
| New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL (Hyper-V firewall))" -Action Allow |