mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 07:25:12 +00:00
enhance(backend): Add address bind config option (#11725)
* Add address bind config option * Edit changelog * forgot to add to types
This commit is contained in:
parent
c9aeccb2ab
commit
3eacbe6b6d
4 changed files with 9 additions and 0 deletions
|
@ -159,6 +159,9 @@ id: 'aid'
|
||||||
#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
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
### Server
|
### Server
|
||||||
- Fix: APIのオフセットが壊れていたせいで「もっと見る」でもっと見れない問題を修正
|
- Fix: APIのオフセットが壊れていたせいで「もっと見る」でもっと見れない問題を修正
|
||||||
- Fix: 外部サーバーの投稿がタイムラインに表示されないことがある問題を修正
|
- Fix: 外部サーバーの投稿がタイムラインに表示されないことがある問題を修正
|
||||||
|
- Enhance: Add address bind config option (outgoingAddress)
|
||||||
|
|
||||||
## 13.14.1
|
## 13.14.1
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ export type Source = {
|
||||||
|
|
||||||
id: string;
|
id: string;
|
||||||
|
|
||||||
|
outgoingAddress?: string;
|
||||||
outgoingAddressFamily?: 'ipv4' | 'ipv6' | 'dual';
|
outgoingAddressFamily?: 'ipv4' | 'ipv6' | 'dual';
|
||||||
|
|
||||||
deliverJobConcurrency?: number;
|
deliverJobConcurrency?: number;
|
||||||
|
|
|
@ -53,12 +53,14 @@ export class HttpRequestService {
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
keepAliveMsecs: 30 * 1000,
|
keepAliveMsecs: 30 * 1000,
|
||||||
lookup: cache.lookup as unknown as net.LookupFunction,
|
lookup: cache.lookup as unknown as net.LookupFunction,
|
||||||
|
localAddress: config.outgoingAddress,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.https = new https.Agent({
|
this.https = new https.Agent({
|
||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
keepAliveMsecs: 30 * 1000,
|
keepAliveMsecs: 30 * 1000,
|
||||||
lookup: cache.lookup as unknown as net.LookupFunction,
|
lookup: cache.lookup as unknown as net.LookupFunction,
|
||||||
|
localAddress: config.outgoingAddress,
|
||||||
});
|
});
|
||||||
|
|
||||||
const maxSockets = Math.max(256, config.deliverJobConcurrency ?? 128);
|
const maxSockets = Math.max(256, config.deliverJobConcurrency ?? 128);
|
||||||
|
@ -71,6 +73,7 @@ export class HttpRequestService {
|
||||||
maxFreeSockets: 256,
|
maxFreeSockets: 256,
|
||||||
scheduling: 'lifo',
|
scheduling: 'lifo',
|
||||||
proxy: config.proxy,
|
proxy: config.proxy,
|
||||||
|
localAddress: config.outgoingAddress,
|
||||||
})
|
})
|
||||||
: this.http;
|
: this.http;
|
||||||
|
|
||||||
|
@ -82,6 +85,7 @@ export class HttpRequestService {
|
||||||
maxFreeSockets: 256,
|
maxFreeSockets: 256,
|
||||||
scheduling: 'lifo',
|
scheduling: 'lifo',
|
||||||
proxy: config.proxy,
|
proxy: config.proxy,
|
||||||
|
localAddress: config.outgoingAddress,
|
||||||
})
|
})
|
||||||
: this.https;
|
: this.https;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue