Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Tor
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 319
    • Issues 319
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 37
    • Merge requests 37
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Core
  • TorTor
  • Issues
  • #132
Closed
Open
Created May 10, 2005 by goodell@goodell

convert "router.exit" requests to "or-address.router.exit"

Connection requests for "router.exit" should not simply be terminated. Instead, they should be interpreted as requests to services running on the OR in question. I am including a patch that prepends the address of the OR, as provided by the descriptor, to requests of the form "router.exit".

I have tested this patch thoroughly, and it works.

Note that this feature might provide an alternative way of resolving the oft-asked question on the mailing list "how do I access a resource on a particular server but know that I am exiting Tor from a node running on that server?"

diff -u or/connection_edge.c or.patch/connection_edge.c                                                  
--- or/connection_edge.c        2005-05-07 01:55:06.000000000 -0400                                      
+++ or.patch/connection_edge.c  2005-05-09 13:01:47.000000000 -0400                                      
@@ -914,7 +914,13 @@                                                                                     
   if (addresstype == EXIT_HOSTNAME) {                                                                   
     /* .exit -- modify conn to specify the exit node. */                                                
     char *s = strrchr(socks->address,'.');                                                              
-    if (!s || s[1] == '\0') {                                                                           
+    if (!s) {                                                                                           
+      char *orig = tor_strdup(socks->address);                                                          
+      strlcpy(socks->address, "127.0.0.1.", sizeof(socks->address));                                    
+      strlcat(socks->address, orig, sizeof(socks->address));                                            
+      s = strrchr(socks->address,'.');                                                                  
+    }                                                                                                   
+    if (s[1] == '\0') {                                                                                 
       log_fn(LOG_WARN,"Malformed exit address '%s'. Refusing.",                                         
              safe_str(socks->address));                                                                 
       connection_mark_unattached_ap(conn, END_STREAM_REASON_TORPROTOCOL);                               

[Automatically added by flyspray2trac: Operating System: All]

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