Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • T Torsocks
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 39
    • Issues 39
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • Torsocks
  • Issues
  • #11205
Closed
Open
Issue created Mar 14, 2014 by yurivict271@yurivict271

[PATCH] gethostbyname2 needs to be supported in addition to gethostbyname

Repost of the bug from the old bug repotring system: https://code.google.com/p/torsocks/issues/detail?id=60

On some systems, like FreeBSD, function gethostbyname2(3) is defined in addition to gethostbyname(3). Here is its signature: struct hostent * gethostbyname2(const char *name, int af);

If the process uses gethostbyname2 instead of gethostbyname for the name resolution, it doesn't go through SOCKS5 and connection fails.

Need to support it.

Particularly, mplayer configures itself to use gethostbyname2 on FreeBSD, and therefore by default doesn't work with libtorsocks.

Implemented gethost by name in case of tcp v4, v6 is not yet implemented.

Tested with the streams played by mplayer. DNS resolution works fine.

torsocks-1.2_1

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking