[tor-bugs] #5454 [Stem]: ExitPolicy Class for stem

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Jun 19 15:04:40 UTC 2012


#5454: ExitPolicy Class for stem
-------------------------+--------------------------------------------------
 Reporter:  gsathya      |          Owner:  atagar           
     Type:  enhancement  |         Status:  needs_information
 Priority:  normal       |      Milestone:                   
Component:  Stem         |        Version:                   
 Keywords:               |         Parent:                   
   Points:               |   Actualpoints:                   
-------------------------+--------------------------------------------------

Comment(by atagar):

 > Ok this might be a little late, but in retrospect, do we really need a
 MicrodescriptorExitPolicy class? What is the point of it?

 What we want from this ticket is this:
 A class that represents an exit policy, which we can use to see 'can I
 exit to this ip/port'

 That's all. Anything that achieves that objective is good by me. :)

 The reason for having separate classes for descriptor and microdescriptor
 exit policies is that they have different formats and (I assume) different
 rules for what we can exit to since microdescriptors don't contain as much
 information. It's also more proper from an object-oriented aspect since
 they *are* different things.

 My suggestion would be to put the bulk of the logic into an ExitPolicy
 class, then have just the divergent methods in the DescriptorExitPolicy
 and MicrodescriptorExitPolicy subclasses (or whatever you call them). This
 would be similar to how we do the ControlSocket...
 https://gitweb.torproject.org/stem.git/blob/HEAD:/stem/socket.py

 Thoughts?

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/5454#comment:12>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list