mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-02-02 03:06:29 +00:00
print debug info
This commit is contained in:
parent
1eeed74cf6
commit
6a8bf395a6
1 changed files with 17 additions and 16 deletions
|
@ -329,22 +329,23 @@ class SOCKSSocket {
|
|||
final reply = SOCKSReply._(data[1]);
|
||||
//data[2] reserved
|
||||
|
||||
// final version = data[0];
|
||||
// final addrType = SOCKSAddressType._(data[3]);
|
||||
// Uint8List addr;
|
||||
// var port = 0;
|
||||
// if (addrType == SOCKSAddressType.Domain) {
|
||||
// final len = data[4];
|
||||
// addr = data.sublist(5, 5 + len);
|
||||
// port = data[5 + len] << 8 | data[6 + len];
|
||||
// } else if (addrType == SOCKSAddressType.IPv4) {
|
||||
// addr = data.sublist(5, 9);
|
||||
// port = data[9] << 8 | data[10];
|
||||
// } else if (addrType == SOCKSAddressType.IPv6) {
|
||||
// addr = data.sublist(5, 21);
|
||||
// port = data[21] << 8 | data[22];
|
||||
// }
|
||||
// print("<< Version: $version, Reply: $reply, AddrType: $addrType, Addr: $addr, Port: $port");
|
||||
final version = data[0];
|
||||
final addrType = SOCKSAddressType._(data[3]);
|
||||
Uint8List? addr;
|
||||
var port = 0;
|
||||
if (addrType == SOCKSAddressType.Domain) {
|
||||
final len = data[4];
|
||||
addr = data.sublist(5, 5 + len);
|
||||
port = data[5 + len] << 8 | data[6 + len];
|
||||
} else if (addrType == SOCKSAddressType.IPv4) {
|
||||
addr = data.sublist(5, 9);
|
||||
port = data[9] << 8 | data[10];
|
||||
} else if (addrType == SOCKSAddressType.IPv6) {
|
||||
addr = data.sublist(5, 21);
|
||||
port = data[21] << 8 | data[22];
|
||||
}
|
||||
print(
|
||||
"<< Version: $version, Reply: $reply, AddrType: $addrType, Addr: $addr, Port: $port");
|
||||
|
||||
if (reply._value == SOCKSReply.Success._value) {
|
||||
_setState(SOCKSState.Connected);
|
||||
|
|
Loading…
Reference in a new issue