Merge branch 'bind-address' into 'develop'
Add address bind config option Closes #10575 See merge request firefish/firefish!10569
This commit is contained in:
commit
2c3d222d3b
@ -161,6 +161,9 @@ reservedUsernames: [
|
|||||||
# deliverJobMaxAttempts: 12
|
# deliverJobMaxAttempts: 12
|
||||||
# inboxJobMaxAttempts: 8
|
# inboxJobMaxAttempts: 8
|
||||||
|
|
||||||
|
# Local address used for outgoing requests
|
||||||
|
#outgoingAddress: 127.0.0.1
|
||||||
|
|
||||||
# IP address family used for outgoing request (ipv4, ipv6 or dual)
|
# IP address family used for outgoing request (ipv4, ipv6 or dual)
|
||||||
#outgoingAddressFamily: ipv4
|
#outgoingAddressFamily: ipv4
|
||||||
|
|
||||||
|
@ -78,6 +78,7 @@ export type Source = {
|
|||||||
fingerprint?: string;
|
fingerprint?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outgoingAddress?: string;
|
||||||
outgoingAddressFamily?: "ipv4" | "ipv6" | "dual";
|
outgoingAddressFamily?: "ipv4" | "ipv6" | "dual";
|
||||||
|
|
||||||
deliverJobConcurrency?: number;
|
deliverJobConcurrency?: number;
|
||||||
|
@ -99,6 +99,7 @@ const _http = new http.Agent({
|
|||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
keepAliveMsecs: 30 * 1000,
|
keepAliveMsecs: 30 * 1000,
|
||||||
lookup: cache.lookup,
|
lookup: cache.lookup,
|
||||||
|
localAddress: config.outgoingAddress,
|
||||||
} as http.AgentOptions);
|
} as http.AgentOptions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -108,6 +109,7 @@ const _https = new https.Agent({
|
|||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
keepAliveMsecs: 30 * 1000,
|
keepAliveMsecs: 30 * 1000,
|
||||||
lookup: cache.lookup,
|
lookup: cache.lookup,
|
||||||
|
localAddress: config.outgoingAddress,
|
||||||
} as https.AgentOptions);
|
} as https.AgentOptions);
|
||||||
|
|
||||||
const maxSockets = Math.max(256, config.deliverJobConcurrency || 128);
|
const maxSockets = Math.max(256, config.deliverJobConcurrency || 128);
|
||||||
@ -123,6 +125,7 @@ export const httpAgent = config.proxy
|
|||||||
maxFreeSockets: 256,
|
maxFreeSockets: 256,
|
||||||
scheduling: "lifo",
|
scheduling: "lifo",
|
||||||
proxy: config.proxy,
|
proxy: config.proxy,
|
||||||
|
localAddress: config.outgoingAddress,
|
||||||
})
|
})
|
||||||
: _http;
|
: _http;
|
||||||
|
|
||||||
@ -137,6 +140,7 @@ export const httpsAgent = config.proxy
|
|||||||
maxFreeSockets: 256,
|
maxFreeSockets: 256,
|
||||||
scheduling: "lifo",
|
scheduling: "lifo",
|
||||||
proxy: config.proxy,
|
proxy: config.proxy,
|
||||||
|
localAddress: config.outgoingAddress,
|
||||||
})
|
})
|
||||||
: _https;
|
: _https;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user