staging(no atomic commits thank to git-hooks)
Signed-off-by: s0me1newithhand7s <git+me@hand7s.org>
This commit is contained in:
parent
db3b60a846
commit
c5f949506a
117 changed files with 2520 additions and 999 deletions
|
|
@ -1,26 +1,33 @@
|
|||
{...}: {
|
||||
{lib, ...}: {
|
||||
services = {
|
||||
sing-box = {
|
||||
enable = true;
|
||||
settings = {
|
||||
log = {
|
||||
level = "debug";
|
||||
level = "error";
|
||||
};
|
||||
|
||||
dns = {
|
||||
servers = [
|
||||
{
|
||||
type = "local";
|
||||
tag = "cloudflare";
|
||||
type = "quic";
|
||||
server = "1.1.1.1";
|
||||
}
|
||||
|
||||
{
|
||||
tag = "local";
|
||||
type = "local";
|
||||
}
|
||||
];
|
||||
|
||||
final = "local";
|
||||
strategy = "prefer_ipv6";
|
||||
final = "cloudflare";
|
||||
strategy = "prefer_ipv4";
|
||||
};
|
||||
|
||||
route = {
|
||||
final = "direct-out";
|
||||
default_domain_resolver = "cloudflare";
|
||||
auto_detect_interface = true;
|
||||
};
|
||||
|
||||
|
|
@ -32,54 +39,69 @@
|
|||
];
|
||||
|
||||
inbounds = [
|
||||
{
|
||||
type = "hysteria2";
|
||||
tag = "hy2-in";
|
||||
listen = "::";
|
||||
listen_port = 2053;
|
||||
masquerade = "https://hand7s.org";
|
||||
up_mbps = 100;
|
||||
down_mbps = 100;
|
||||
obfs = {
|
||||
type = "salamander";
|
||||
password = lib.hashString "sha512" "randomstring"; # not a real string
|
||||
};
|
||||
|
||||
users = [
|
||||
{
|
||||
name = "hand7s";
|
||||
password = lib.hashString "sha512" "userstring"; # not a real string
|
||||
}
|
||||
];
|
||||
|
||||
tls = {
|
||||
enabled = true;
|
||||
server_name = "hand7s.org";
|
||||
certificate_path = "/var/lib/acme/hand7s.org/cert.pem";
|
||||
key_path = "/var/lib/acme/hand7s.org/key.pem";
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
type = "vless";
|
||||
tag = "vless-inbound";
|
||||
|
||||
listen = "::";
|
||||
listen_port = 53570;
|
||||
listen_port = 8443;
|
||||
|
||||
sniff = true;
|
||||
|
||||
users = [
|
||||
{
|
||||
name = "hand7s_1";
|
||||
uuid = "${singboxUUID2}";
|
||||
flow = "xtls-rprx-vision";
|
||||
}
|
||||
|
||||
{
|
||||
name = "hand7s_2";
|
||||
uuid = "${singboxUUID2}";
|
||||
name = "hand7s";
|
||||
uuid = lib.hashString "sha512" "uuidstring"; # not a real string
|
||||
flow = "xtls-rprx-vision";
|
||||
}
|
||||
];
|
||||
|
||||
tls = rec {
|
||||
tls = {
|
||||
enabled = true;
|
||||
server_name = "vk.com";
|
||||
server_name = "hand7s.org";
|
||||
reality = {
|
||||
enabled = true;
|
||||
max_time_difference = "5m";
|
||||
handshake = {
|
||||
server = server_name;
|
||||
server = "127.0.0.1";
|
||||
server_port = 443;
|
||||
};
|
||||
|
||||
private_key = "${singboxKey}";
|
||||
private_key = lib.hashString "sha512" "uuidstring"; # not a real string
|
||||
|
||||
short_id = [
|
||||
"${singboxId}"
|
||||
"shortie"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
transport = {
|
||||
type = "httpupgrade";
|
||||
};
|
||||
|
||||
multiplex = {
|
||||
enabled = true;
|
||||
padding = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue