add proxy stuff
This commit is contained in:
parent
dcad5d0e51
commit
a669ac057f
1 changed files with 26 additions and 0 deletions
|
|
@ -4,8 +4,32 @@
|
||||||
let
|
let
|
||||||
socket = "/var/run/searx/socket";
|
socket = "/var/run/searx/socket";
|
||||||
domain = "search.federated.nexus";
|
domain = "search.federated.nexus";
|
||||||
|
|
||||||
|
prefix = "2a01:4f8:c012:d202";
|
||||||
|
count = 32;
|
||||||
|
basePort = 10000;
|
||||||
|
loopback = "127.0.0.8";
|
||||||
|
|
||||||
|
ipv6List = builtins.genList (i: "${prefix}::${builtins.toString (i + 1)}") count;
|
||||||
|
|
||||||
|
proxyPorts = builtins.genList (i: basePort + i) count;
|
||||||
|
|
||||||
|
proxyUrls = map (port: "http://${loopback}:${builtins.toString port}") proxyPorts;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
_3proxy = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
services = builtins.genList (i: {
|
||||||
|
type = "proxy";
|
||||||
|
bindAddress = loopback;
|
||||||
|
bindPort = builtins.elemAt proxyPorts i;
|
||||||
|
auth = [ "none" ];
|
||||||
|
|
||||||
|
extraArguments = "-6 -a -e${builtins.elemAt ipv6List i}";
|
||||||
|
}) count;
|
||||||
|
};
|
||||||
|
|
||||||
searx = {
|
searx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings =
|
settings =
|
||||||
|
|
@ -91,6 +115,8 @@
|
||||||
"searx.plugins.tracker_url_remover.SXNGPlugin".active = true;
|
"searx.plugins.tracker_url_remover.SXNGPlugin".active = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outgoing.proxies."all://" = proxyUrls;
|
||||||
|
|
||||||
categories_as_tabs = builtins.listToAttrs (
|
categories_as_tabs = builtins.listToAttrs (
|
||||||
map (category: {
|
map (category: {
|
||||||
name = category;
|
name = category;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue