@@ -82,32 +82,16 @@ Console.info(`PLATFORM: ${PLATFORM}`);
8282 let rawBody = $app === "Quantumult X" ? new Uint8Array ( $request . bodyBytes ?? [ ] ) : ( $request . body ?? new Uint8Array ( ) ) ;
8383 //Console.debug(`isBuffer? ${ArrayBuffer.isView(rawBody)}: ${JSON.stringify(rawBody, null, 2)}`);
8484 switch ( url . hostname ) {
85- case "gsp-ssl.ls.apple.com" :
8685 case "dispatcher.is.autonavi.com" :
8786 switch ( url . pathname ) {
88- case "/dispatcher.arpc" :
8987 case "/dispatcher" : {
90- /****************** initialization start *******************/
91- // 先拆分aRPC校验头和protobuf数据体
92- const headerIndex = rawBody . findIndex ( ( element , index ) => element === 0x0a && index > 47 ) ;
93- Console . debug ( `headerIndex: ${ headerIndex } ` ) ;
94- const Header = rawBody . slice ( 0 , headerIndex ) ;
95- body = rawBody . slice ( headerIndex ) ;
96- /****************** initialization finish *******************/
97- body = GEOPDPlaceRequest . decode ( body ) ;
98- Console . debug ( `body: ${ JSON . stringify ( body , null , 2 ) } ` ) ;
99- switch ( body . requestType ) {
100- case "REQUEST_TYPE_REVERSE_GEOCODING" :
101- break ;
102- }
103- body . displayRegion = "US" ;
104- body . clientMetadata . deviceCountryCode = "US" ;
105- body = GEOPDPlaceRequest . encode ( body ) ;
106- /****************** initialization start *******************/
107- rawBody = new Uint8Array ( Header . length + body . length ) ;
108- rawBody . set ( Header , 0 ) ;
109- rawBody . set ( body , Header . length ) ;
110- /****************** initialization finish *******************/
88+ break ;
89+ }
90+ }
91+ break ;
92+ case "gsp-ssl.ls.apple.com" :
93+ switch ( url . pathname ) {
94+ case "/dispatcher.arpc" : {
11195 break ;
11296 }
11397 }
@@ -137,19 +121,6 @@ Console.info(`PLATFORM: ${PLATFORM}`);
137121 case "gspe1-ssl.ls.apple.com" :
138122 switch ( url . pathname ) {
139123 case "/pep/gcc" :
140- /* // 不使用 echo response
141- $response = {
142- status: 200,
143- headers: {
144- "Content-Type": "text/html",
145- Date: new Date().toUTCString(),
146- Connection: "keep-alive",
147- "Content-Encoding": "identity",
148- },
149- body: Settings.PEP.GCC,
150- };
151- Console.debug(JSON.stringify($response));
152- */
153124 break ;
154125 }
155126 break ;
0 commit comments