tor-dam

tor distributed announce mechanism (not a dht)
git clone https://git.parazyd.org/tor-dam
Log | Files | Refs | README | LICENSE

config.go (2005B)


      1 package damlib
      2 
      3 /*
      4  * Copyright (c) 2017-2018 Dyne.org Foundation
      5  * tor-dam is written and maintained by Ivan Jelincic <parazyd@dyne.org>
      6  *
      7  * This file is part of tor-dam
      8  *
      9  * This program is free software: you can redistribute it and/or modify
     10  * it under the terms of the GNU Affero General Public License as published by
     11  * the Free Software Foundation, either version 3 of the License, or
     12  * (at your option) any later version.
     13  *
     14  * This program is distributed in the hope that it will be useful,
     15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     17  * GNU Affero General Public License for more details.
     18  *
     19  * You should have received a copy of the GNU Affero General Public License
     20  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
     21  */
     22 
     23 import "os"
     24 
     25 // Workdir holds the path to the directory where we will Chdir on startup.
     26 var Workdir = os.Getenv("HOME") + "/.dam"
     27 
     28 // PrivKeyPath holds the name of where our private key is.
     29 const PrivKeyPath = "dam-private.key"
     30 
     31 // SeedPath holds the name of where our private key seed is.
     32 const SeedPath = "dam-private.seed"
     33 
     34 // PubSubChan is the name of the pub/sub channel we're publishing to in Redis.
     35 const PubSubChan = "tordam"
     36 
     37 // PostMsg holds the message we are signing with our private key.
     38 const PostMsg = "I am a DAM node!"
     39 
     40 // WelcomeMsg holds the message we return when welcoming a node.
     41 const WelcomeMsg = "Welcome to the DAM network!"
     42 
     43 // ProxyAddr is the address of our Tor SOCKS port.
     44 const ProxyAddr = "127.0.0.1:9050"
     45 
     46 // TorPortMap is a comma-separated string holding the mapping of ports
     47 // to be opened by the Tor Hidden Service. Format is "remote:local".
     48 var TorPortMap = "80:49371,13010:13010,13011:13011,5000:5000"
     49 
     50 // DirPort is the port where dam-dir will be listening.
     51 const DirPort = 49371
     52 
     53 // Testnet is flipped with a flag in dam-dir and represents if all new
     54 // nodes are initially marked valid or not.
     55 var Testnet = false