GSMLG.Tor.Config (GSMLG.Tor v0.2.3)

Documentation for GSMLG.Tor.Config.

Link to this section Summary

Functions

Get tor command path

Create config directory and write config file.

Return torrc file content

Return torrc file path at priv/etc/torrc

Link to this section Functions

Get tor command path

tor-command-path-lookup-diagram

tor command path lookup diagram

  1. Use config in Application.get_env(:gsmlg_tor, GSMLG.Tor.Config) |> Keyword.fetch(:bin_path)
  2. Use Application.app_dir(:gsmlg_tor, "priv/tor/tor") if file exists
  3. At last, download by Downloader.download() throught internet

Create config directory and write config file.

Return torrc file content

torrc-lookup-diagram

torrc lookup diagram

  1. At first, read from Application.get_env(:gsmlg_tor, GSMLG.Tor.Config) |> Keyword.fetch(:conf_path) if set.
  2. Second, use Application.get_env(:gsmlg_tor, GSMLG.Tor.Config) |> Keyword.get(:conf) if not nil.
  3. At last, use default setting as below:
    SOCKSPort 127.0.0.1:9050 # localhost IPv4
    SOCKSPort [::1]:9050     # localhost IPv6
    
    SOCKSPolicy accept 127.0.0.1/8
    SOCKSPolicy accept ::1/128
    
    SOCKSPolicy reject *
    SOCKSPolicy reject6 *
    
    
    Scheduler KISTLite,Vanilla
    
    DataDirectory {Application.app_dir(:gsmlg_tor, "priv")}/data
    
    FascistFirewall 0
    
    
    ## Client Authentication
    
    HardwareAccel 1

Return torrc file path at priv/etc/torrc