aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-09-30 15:47:48 +0200
committerfiaxh <git@lightrise.org>2021-09-30 15:47:48 +0200
commit7c7910729acbaa81593eeedcc27424c1b6648f4e (patch)
tree1027ff3b3a5f50c94240500678760f361f5f2105 /xmpp-vala
parent6ca47bf795d553b74e815621be6ca75dc350edbc (diff)
downloaddino-7c7910729acbaa81593eeedcc27424c1b6648f4e.tar.gz
dino-7c7910729acbaa81593eeedcc27424c1b6648f4e.zip
Send SOCKS error and close connection when SOCKS5 handshake fails
Diffstat (limited to 'xmpp-vala')
-rw-r--r--xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala b/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
index 47c243e8..32ba8bb9 100644
--- a/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
+++ b/xmpp-vala/src/module/xep/0260_jingle_socks5_bytestreams.vala
@@ -327,6 +327,10 @@ class LocalListener {
connections[cid] = conn;
}
} catch (Error e) {
+ warning("Jingle SOCKS5 bytestream establish error cid %s: %s", cid, e.message);
+ // Send a "general SOCKS server failure" (0x01)
+ yield conn.output_stream.write_all_async({0x05, 0x01}, GLib.Priority.DEFAULT, null, out written);
+ yield conn.output_stream.close_async();
}
}