Skip to content

Commit 50789dc

Browse files
committed
feat: add password field to RealityObject interface and update publicKey retrieval logic
- Introduced a new optional 'password' field in the RealityObject interface to enhance configuration options. - Updated the logic in FormatHostsService to retrieve the publicKey from realitySettings, falling back to the new password field if publicKey is not available.
1 parent 3e9479a commit 50789dc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/common/helpers/xray-config/interfaces/transport.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export interface RealityObject {
2929
serverNames?: string[];
3030
privateKey?: string;
3131
publicKey?: string;
32+
password?: string;
3233
maxClientVer?: string;
3334
maxTimeDiff?: number;
3435
minClientVer?: string;

src/modules/subscription-template/generators/format-hosts.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export class FormatHostsService {
196196
// console.log(error);
197197
// }
198198

199-
publicKeyFromConfig = realitySettings?.publicKey;
199+
publicKeyFromConfig = realitySettings?.publicKey || realitySettings?.password;
200200

201201
spiderXFromConfig = realitySettings?.spiderX;
202202
const shortIds = inbound.streamSettings?.realitySettings?.shortIds || [];

0 commit comments

Comments
 (0)