File tree Expand file tree Collapse file tree 1 file changed +22
-14
lines changed
src/common/helpers/xray-config Expand file tree Collapse file tree 1 file changed +22
-14
lines changed Original file line number Diff line number Diff line change @@ -75,25 +75,33 @@ export async function resolveEncryptionFromDecryption(
75
75
const encryptionMap = new Map < string , string > ( ) ;
76
76
77
77
for ( const inbound of inbounds ) {
78
- if ( inbound . protocol !== 'vless' ) {
79
- continue ;
80
- }
78
+ try {
79
+ if ( inbound . protocol !== 'vless' ) {
80
+ continue ;
81
+ }
81
82
82
- if ( ! inbound . settings ) {
83
- continue ;
84
- }
83
+ if ( ! inbound . settings ) {
84
+ continue ;
85
+ }
85
86
86
- if ( ! inbound . settings . decryption ) {
87
- continue ;
88
- }
87
+ if ( ! inbound . settings . decryption ) {
88
+ continue ;
89
+ }
89
90
90
- if ( inbound . settings . decryption === 'none' ) {
91
- continue ;
92
- }
91
+ if ( inbound . settings . decryption === 'none' ) {
92
+ continue ;
93
+ }
93
94
94
- const encryption = await generateEncryptionFromDecryption ( inbound . settings . decryption ) ;
95
+ if ( encryptionMap . has ( inbound . tag ) ) {
96
+ continue ;
97
+ }
98
+
99
+ const encryption = await generateEncryptionFromDecryption ( inbound . settings . decryption ) ;
95
100
96
- encryptionMap . set ( inbound . tag , encryption . encryption ) ;
101
+ encryptionMap . set ( inbound . tag , encryption . encryption ) ;
102
+ } catch {
103
+ continue ;
104
+ }
97
105
}
98
106
99
107
return encryptionMap ;
You can’t perform that action at this time.
0 commit comments