treewide: upstreaming changes
Signed-off-by: s0me1newithhand7s <117505144+s0me1newithhand7s@users.noreply.github.com>
This commit is contained in:
parent
d159232b37
commit
e4e1b03c7e
160 changed files with 3408 additions and 5474 deletions
91
s0mev1rtn0de-nix/services/sing-box.nix
Normal file
91
s0mev1rtn0de-nix/services/sing-box.nix
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
# config,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
sing-box = {
|
||||
enable = true;
|
||||
settings = {
|
||||
log = {
|
||||
level = "debug";
|
||||
};
|
||||
|
||||
dns = {
|
||||
servers = [
|
||||
{
|
||||
type = "local";
|
||||
tag = "local";
|
||||
}
|
||||
];
|
||||
|
||||
final = "local";
|
||||
strategy = "prefer_ipv6";
|
||||
};
|
||||
|
||||
route = {
|
||||
final = "direct-out";
|
||||
auto_detect_interface = true;
|
||||
};
|
||||
|
||||
outbounds = [
|
||||
{
|
||||
tag = "direct-out";
|
||||
type = "direct";
|
||||
}
|
||||
];
|
||||
|
||||
inbounds = [
|
||||
{
|
||||
type = "vless";
|
||||
tag = "vless-inbound";
|
||||
|
||||
listen = "::";
|
||||
listen_port = 53570;
|
||||
|
||||
users = [
|
||||
{
|
||||
name = "hand7s_1";
|
||||
uuid = "${singboxUUID2}";
|
||||
flow = "xtls-rprx-vision";
|
||||
}
|
||||
|
||||
{
|
||||
name = "hand7s_2";
|
||||
uuid = "${singboxUUID2}";
|
||||
flow = "xtls-rprx-vision";
|
||||
}
|
||||
];
|
||||
|
||||
tls = rec {
|
||||
enabled = true;
|
||||
server_name = "vk.com";
|
||||
reality = {
|
||||
enabled = true;
|
||||
max_time_difference = "5m";
|
||||
handshake = {
|
||||
server = server_name;
|
||||
server_port = 443;
|
||||
};
|
||||
|
||||
private_key = "${singboxKey}";
|
||||
|
||||
short_id = [
|
||||
"${singboxId}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
transport = {
|
||||
type = "httpupgrade";
|
||||
};
|
||||
|
||||
multiplex = {
|
||||
enabled = true;
|
||||
padding = false;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue