[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #30552 [Applications/Tor Browser]: Android - Clean up torrc



#30552: Android - Clean up torrc
----------------------------------------------+----------------------------
 Reporter:  sysrqb                            |          Owner:  tbb-team
     Type:  defect                            |         Status:
                                              |  needs_revision
 Priority:  Medium                            |      Milestone:
Component:  Applications/Tor Browser          |        Version:
 Severity:  Normal                            |     Resolution:
 Keywords:  tbb-mobile, TorBrowserTeam201910  |  Actual Points:
Parent ID:                                    |         Points:  0.5
 Reviewer:                                    |        Sponsor:
----------------------------------------------+----------------------------

Comment (by sisbell):

 Replying to [comment:8 sysrqb]:
 > Replying to [comment:6 sisbell]:
 > > I made the following changes to tor-onion-proxy-library. If the
 changes look good, I will need to make it compatible with tor-android-
 service.
 >
 > I think it would make more sense leaving TOPL's defaults unchanged, as
 much as possible. I don't see a problem with explicitly setting default
 values in the torrc (like `TestSocks 0`), but I do like cleaner defaults
 and a cleaner/smaller generated torrc.
 >
 >
 > >
 > > * StrictNodes, UseBridges, SafeSocks, TestSocks will not be included
 in the torrc if they have a 0 value
 >
 > I don't have a strong opinion on this. It doesn't really have any impact
 until tor's default values change for whatever reason.
 >
 >
 > > * DnsPort, HttpTunnelPort, TransparentProxyPort are now all Integers.
 I also added an associated host field for each one.
 > > * ProxyPort, ProxySocks5ServerPort are now an Integers rather than
 Strings.
 > > * HttpTunnelPort and TransPort values are set to null so it won't
 appear in torrc by default.
 > > * AutomapHostsOnResolve is set to false so won't appear in torrc by
 default
 >
 > These are the more important changes.
 >
 >
 > >
 > > The remaining field VirtualAddrNetwork will need to be removed in tor-
 android-service
 > >
 > >
 https://github.com/sisbell/Tor_Onion_Proxy_Library/commit/73aeed144259a66930e605c7804946c9f6041b59
 > >
 >
 >
 `universal/src/main/java/com/msopentech/thali/toronionproxy/DefaultSettings.java`
 > {{{
 >      @Override
 > -    public int getHttpTunnelPort() {
 > -        return 8118;
 > +    public String getHttpTunnelHost() {
 > +        return null;
 > +    }
 > +
 > +    @Override
 > +    public Integer getHttpTunnelPort() {
 > +        return null;
 >      }
 > }}}
 > This is changing the default port, is that intentional?

 Yes, I don't believe we use this by default. it can be set in tor-android-
 service if needed.
 >
 > {{{
 >      @Override
 > -    public String transPort() {
 > -        return "9040";
 > +    public String getTransparentProxyAddress() {
 > +        return null;
 > +    }
 > +
 > +    @Override
 > +    public Integer getTransparentProxyPort() {
 > +        return null;
 > }}}
 > This is changing the default port, is that intentional?
 Yes, I don't believe we use this by default. it can be set in tor-android-
 service if needed.
 >
 > {{{
 > +    TorConfigBuilder addAddress(String fieldName, String address,
 Integer port, String flags) {
 > +        if(isNullOrEmpty(address) && port == null) {
 > +            return this;
 > +        }
 > +        buffer.append(fieldName).append(" ");
 > +        if(!isNullOrEmpty(address)) {
 > +            buffer.append(address).append(":");
 > +        }
 > +        if (port != null) {
 > +            buffer.append(port <= 0 ? "auto" : port);
 > }}}
 > Please pass this directly to tor, we shouldn't change the intended
 behavior if the app configures a 0 or negative port number. Tor will emit
 a warning which the app should handle itself.
 The negative int or null value is treated a "magic" number for "auto".
 This is really because tor config accepts strings (auto) or int types for
 port so we have to be able to handle this somehow.

 >
 >
 `universal/src/test/java/com/msopentech/thali/toronionproxy/TorConfigBuilderTest.java`
 >
 > {{{
 > +    /**
 > +     * SHould be empty
 > +     */
 > }}}
 > nit.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/30552#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs