netsh interface portproxy delete v6tov4 listenaddress=any listenport=23139
netsh interface portproxy delete v6tov4 listenaddress=any listenport=23445
netsh interface portproxy add v6tov4 listenaddress=[::] listenport=23139 connectaddress=127.0.0.1 connectport=139
netsh interface portproxy add v6tov4 listenaddress=[::] listenport=23445 connectaddress=127.0.0.1 connectport=445
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
// library | |
#pragma GCC diagnostic push | |
#pragma GCC diagnostic ignored "-Wnon-template-friend" | |
template<typename Tag, typename Tag::type MemberPointer> | |
struct Rob { | |
friend decltype(MemberPointer) access(Tag) { return MemberPointer; } | |
}; |
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
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.core.JsonProcessingException; | |
import com.fasterxml.jackson.core.TreeNode; | |
import com.fasterxml.jackson.core.type.TypeReference; | |
import com.fasterxml.jackson.databind.*; | |
import com.fasterxml.jackson.databind.util.TokenBuffer; |
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
# BBR | |
net.core.default_qdisc=fq | |
net.ipv4.tcp_congestion_control=bbr | |
fs.file-max = 1000000 | |
fs.inotify.max_user_instances = 8192 | |
net.ipv4.tcp_syncookies = 1 | |
net.ipv4.tcp_fin_timeout = 30 | |
net.ipv4.tcp_tw_reuse = 1 |
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
#include <stdio.h> | |
#include <stdlib.h> | |
int days_m[] = { | |
31, | |
28, | |
31, | |
30, | |
31, | |
30, |
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
// ==UserScript== | |
// @name anti-csdn-ad-checker | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description csdn sucks! | |
// @author noname | |
// @match https://blog.csdn.net/*/article/details/* | |
// @grant none | |
// @requires https://code.jquery.com/jquery-3.3.1.min.js | |
// ==/UserScript== |
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
network: | |
version: 2 | |
renderer: networkd | |
ethernets: | |
ens192: | |
dhcp4: yes | |
dhcp6: yes | |
optional: yes | |
ens37: | |
dhcp4: no |
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
server-ip= | |
server-port=25565 | |
use-native-transport=true | |
# 传输压缩的下限,超过此值会尝试压缩(-1 表示禁用) | |
network-compression-threshold=1460 | |
max-players=8 | |
# 是否进行正版用户名验证 | |
online-mode=false | |
# 正版验证时是否接受来源 IP 不一致的情况 |
本文参考自 https://terraria.gamepedia.com/Server 。
1)下载服务器程序
截至发布时,最新版本为 1.3.5.3。你也可以在参考网址里下载到最新版。
下载到的压缩包内有 Windows
Linux
Mac
三个子目录,分别是三个平台对应的版本。本文以 Linux 版本为例。