Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
401f1928
Commit
401f1928
authored
12 years ago
by
zimio
Browse files
Options
Downloads
Patches
Plain Diff
dont connect to local host if ip is the same or if is loopback
parent
2bcc753c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/jingle_transport.py
+2
-1
2 additions, 1 deletion
src/common/jingle_transport.py
src/common/socks5.py
+6
-0
6 additions, 0 deletions
src/common/socks5.py
with
8 additions
and
1 deletion
src/common/jingle_transport.py
+
2
−
1
View file @
401f1928
...
...
@@ -177,7 +177,8 @@ class JingleTransportSocks5(JingleTransport):
return
local_ip_cand
=
[]
port
=
int
(
gajim
.
config
.
get
(
'
file_transfers_port
'
))
type_preference
=
126
#type preference of connection type. XEP-0260 section 2.2
#type preference of connection type. XEP-0260 section 2.2
type_preference
=
126
c
=
{
'
host
'
:
self
.
connection
.
peerhost
[
0
]}
c
[
'
candidate_id
'
]
=
self
.
connection
.
connection
.
getAnID
()
c
[
'
port
'
]
=
port
...
...
This diff is collapsed.
Click to expand it.
src/common/socks5.py
+
6
−
0
View file @
401f1928
...
...
@@ -34,6 +34,7 @@ from errno import EINPROGRESS
from
errno
import
EAFNOSUPPORT
from
xmpp.idlequeue
import
IdleObject
from
file_props
import
FilesProp
from
common
import
gajim
import
jingle_xtls
if
jingle_xtls
.
PYOPENSSL_PRESENT
:
import
OpenSSL
...
...
@@ -116,10 +117,15 @@ class SocksQueue:
self
.
on_failure
[
sid
]
=
on_failure
file_props
=
FilesProp
.
getFileProp
(
account
,
sid
)
file_props
.
failure_cb
=
on_failure
con
=
gajim
.
connections
[
account
]
if
not
file_props
.
streamhosts
:
on_failure
(
file_props
.
sid
)
# add streamhosts to the queue
for
streamhost
in
file_props
.
streamhosts
:
if
streamhost
[
'
host
'
]
==
'
127.0.0.1
'
or
\
streamhost
[
'
host
'
]
==
'
::1
'
or
\
streamhost
[
'
host
'
]
==
con
.
peerhost
[
0
]:
continue
if
'
type
'
in
streamhost
and
streamhost
[
'
type
'
]
==
'
proxy
'
:
fp
=
None
else
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment