@@ -205,33 +205,59 @@ public static string FixupURL(string URL)
205
205
#if UNITY_2018_2_OR_NEWER
206
206
// Use standard endpoints since 2018.2 supports TLS 1.2
207
207
if ( URL . StartsWith ( "http://stream." ) )
208
+ {
208
209
URL = URL . Replace ( "http://stream." , "ws://stream." ) ;
210
+ }
209
211
else if ( URL . StartsWith ( "https://stream." ) )
212
+ {
210
213
URL = URL . Replace ( "https://stream." , "wss://stream." ) ;
214
+ }
211
215
212
- // Old TLS 1.0 endpoint
216
+ // TLS 1.0 endpoint
213
217
else if ( URL . StartsWith ( "http://stream-tls10." ) )
218
+ {
214
219
URL = URL . Replace ( "http://stream-tls10." , "ws://stream." ) ;
220
+ }
215
221
else if ( URL . StartsWith ( "https://stream-tls10." ) )
222
+ {
216
223
URL = URL . Replace ( "https://stream-tls10." , "wss://stream." ) ;
224
+ }
217
225
218
226
// Germany
219
227
else if ( URL . StartsWith ( "http://gateway-fra." ) )
228
+ {
220
229
URL = URL . Replace ( "http://gateway-fra." , "ws://stream-fra." ) ;
230
+ }
221
231
else if ( URL . StartsWith ( "https://gateway-fra." ) )
232
+ {
222
233
URL = URL . Replace ( "https://gateway-fra." , "wss://stream-fra." ) ;
234
+ }
223
235
224
236
// US East
225
237
else if ( URL . StartsWith ( "http://gateway-wdc." ) )
226
- URL = URL . Replace ( "http://gateway-wdc." , "ws://stream." ) ;
238
+ {
239
+ URL = URL . Replace ( "http://gateway-wdc." , "ws://gateway-wdc." ) ;
240
+ }
227
241
else if ( URL . StartsWith ( "https://gateway-wdc." ) )
228
- URL = URL . Replace ( "https://gateway-wdc." , "wss://stream." ) ;
242
+ {
243
+ URL = URL . Replace ( "https://gateway-wdc." , "wss://gateway-wdc." ) ;
244
+ }
245
+
229
246
230
247
// Sydney
231
248
else if ( URL . StartsWith ( "http://gateway-syd." ) )
232
- URL = URL . Replace ( "http://gateway-syd." , "ws://stream-syd." ) ;
249
+ {
250
+ URL = URL . Replace ( "http://gateway-syd." , "ws://gateway-syd." ) ;
251
+ }
233
252
else if ( URL . StartsWith ( "https://gateway-syd." ) )
234
- URL = URL . Replace ( "https://gateway-syd." , "wss://stream-syd." ) ;
253
+ {
254
+ URL = URL . Replace ( "https://gateway-syd." , "wss://gateway-syd." ) ;
255
+ }
256
+
257
+ else
258
+ {
259
+ Log . Warning ( "WSConnector" , "No case for URL for wss://. Leaving URL unchanged." ) ;
260
+ }
235
261
#else
236
262
// Redirect to TLS 1.0 endpoints.
237
263
// Note frankfurt endpoint does not support TLS 1.0.
0 commit comments