File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -209,9 +209,7 @@ async function handleTCPOutBound(
209209 const match = proxyIP . match ( / ^ ( \[ .* ?\] ) : ( \d + ) $ / ) ;
210210 proxyIP = match [ 1 ] ;
211211 proxyIpPort = + match [ 2 ] ;
212- }
213-
214- if ( proxyIP . split ( ':' ) . length === 2 ) {
212+ } else {
215213 proxyIP = proxyIP . split ( ':' ) [ 0 ] ;
216214 proxyIpPort = + proxyIP . split ( ':' ) [ 1 ] ;
217215 }
Original file line number Diff line number Diff line change @@ -154,17 +154,15 @@ async function handleTCPOutBound(
154154 // if the cf connect tcp socket have no incoming data, we retry to redirect ip
155155 async function retry ( ) {
156156 let proxyIP , proxyIpPort ;
157- const EncodedPanelProxyIPs = pathName . split ( '/' ) [ 2 ] || '' ;
157+ const EncodedPanelProxyIPs = globalThis . pathName . split ( '/' ) [ 2 ] || '' ;
158158 const proxyIPs = atob ( EncodedPanelProxyIPs ) || globalThis . proxyIPs ;
159159 const finalProxyIPs = proxyIPs . split ( ',' ) . map ( ip => ip . trim ( ) ) ;
160160 proxyIP = finalProxyIPs [ Math . floor ( Math . random ( ) * finalProxyIPs . length ) ] ;
161161 if ( proxyIP . includes ( ']:' ) ) {
162162 const match = proxyIP . match ( / ^ ( \[ .* ?\] ) : ( \d + ) $ / ) ;
163163 proxyIP = match [ 1 ] ;
164164 proxyIpPort = + match [ 2 ] ;
165- }
166-
167- if ( proxyIP . split ( ':' ) . length === 2 ) {
165+ } else {
168166 proxyIP = proxyIP . split ( ':' ) [ 0 ] ;
169167 proxyIpPort = + proxyIP . split ( ':' ) [ 1 ] ;
170168 }
You can’t perform that action at this time.
0 commit comments