Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
68558bc3
Unverified
Commit
68558bc3
authored
Jun 10, 2019
by
Luca Boccassi
Committed by
GitHub
Jun 10, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3532 from guillon/fix-socks-connect
Fix issues with SOCKS5 proxy connection
parents
178f9e3f
42cfa697
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
10 deletions
+25
-10
guillon.md
RELICENSE/guillon.md
+15
-0
socks_connecter.cpp
src/socks_connecter.cpp
+10
-10
No files found.
RELICENSE/guillon.md
0 → 100644
View file @
68558bc3
# Permission to Relicense under MPLv2 or any other OSI approved license chosen by the current ZeroMQ BDFL
This is a statement by Christophe Guillon
that grants permission to relicense its copyrights in the libzmq C++
library (ZeroMQ) under the Mozilla Public License v2 (MPLv2) or any other
Open Source Initiative approved license chosen by the current ZeroMQ
BDFL (Benevolent Dictator for Life).
A portion of the commits made by the Github handle "guillon", with
commit author "Christophe Guillon
<christophe.guillon.perso@gmail.com>
", are copyright of Christophe Guillon .
This document hereby grants the libzmq project team to relicense libzmq,
including all past, present and future contributions of the author listed above.
Christophe Guillon
2019/06/10
src/socks_connecter.cpp
View file @
68558bc3
...
...
@@ -207,6 +207,7 @@ void zmq::socks_connecter_t::error ()
_choice_decoder
.
reset
();
_request_encoder
.
reset
();
_response_decoder
.
reset
();
_status
=
unplugged
;
add_reconnect_timer
();
}
...
...
@@ -215,29 +216,28 @@ int zmq::socks_connecter_t::connect_to_proxy ()
zmq_assert
(
_s
==
retired_fd
);
// Resolve the address
if
(
_addr
->
resolved
.
tcp_addr
!=
NULL
)
{
LIBZMQ_DELETE
(
_addr
->
resolved
.
tcp_addr
);
if
(
_
proxy_
addr
->
resolved
.
tcp_addr
!=
NULL
)
{
LIBZMQ_DELETE
(
_
proxy_
addr
->
resolved
.
tcp_addr
);
}
_addr
->
resolved
.
tcp_addr
=
new
(
std
::
nothrow
)
tcp_address_t
();
alloc_assert
(
_addr
->
resolved
.
tcp_addr
);
_
proxy_
addr
->
resolved
.
tcp_addr
=
new
(
std
::
nothrow
)
tcp_address_t
();
alloc_assert
(
_
proxy_
addr
->
resolved
.
tcp_addr
);
// Automatic fallback to ipv4 is disabled here since this was the existing
// behaviour, however I don't see a real reason for this. Maybe this can
// be changed to true (and then the parameter can be removed entirely).
_s
=
tcp_open_socket
(
_addr
->
address
.
c_str
(),
options
,
false
,
false
,
_addr
->
resolved
.
tcp_addr
);
_s
=
tcp_open_socket
(
_
proxy_
addr
->
address
.
c_str
(),
options
,
false
,
false
,
_
proxy_
addr
->
resolved
.
tcp_addr
);
if
(
_s
==
retired_fd
)
{
// TODO we should emit some event in this case!
LIBZMQ_DELETE
(
_addr
->
resolved
.
tcp_addr
);
LIBZMQ_DELETE
(
_proxy_addr
->
resolved
.
tcp_addr
);
return
-
1
;
}
zmq_assert
(
_addr
->
resolved
.
tcp_addr
!=
NULL
);
zmq_assert
(
_
proxy_
addr
->
resolved
.
tcp_addr
!=
NULL
);
// Set the socket to non-blocking mode so that we get async connect().
unblock_socket
(
_s
);
const
tcp_address_t
*
const
tcp_addr
=
_addr
->
resolved
.
tcp_addr
;
const
tcp_address_t
*
const
tcp_addr
=
_
proxy_
addr
->
resolved
.
tcp_addr
;
int
rc
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment