Default to obfuscated transport with websocket

This commit is contained in:
Daniil Gentili 2019-06-29 15:21:29 +02:00
parent 49903b215e
commit 6b5775da79
3 changed files with 4 additions and 11 deletions

2
docs

@ -1 +1 @@
Subproject commit cbd913fba2249a0055bb732452a67f911119c40a
Subproject commit 7414ae3e537b26a15b75d2a00ef6f93e702d2cd8

View File

@ -444,18 +444,10 @@ class DataCenter
}
break;
case 'wss':
if ($this->settings[$dc_config_number]['obfuscated']) {
$default = [[DefaultStream::getName(), []], [WssStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)];
} else {
$default = [[DefaultStream::getName(), []], [WssStream::getName(), []], [BufferedRawStream::getName(), []], end($default)];
}
$default = [[DefaultStream::getName(), []], [WssStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)];
break;
case 'ws':
if ($this->settings[$dc_config_number]['obfuscated']) {
$default = [[DefaultStream::getName(), []], [WsStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)];
} else {
$default = [[DefaultStream::getName(), []], [WsStream::getName(), []], [BufferedRawStream::getName(), []], end($default)];
}
$default = [[DefaultStream::getName(), []], [WsStream::getName(), []], [BufferedRawStream::getName(), []], [ObfuscatedStream::getName(), []], end($default)];
break;
}
}

View File

@ -84,6 +84,7 @@ class WsStream implements RawStreamInterface
break;
}
}
if (!$this->stream) {
throw new ConnectionException('Failed to read response from server');
}