console.log('Failed to fetch AO bootstrap server list.')
}else{
console.log('All known .onion addresses in neighborhood:')
console.log(bootstrappedOnionList.join('\n'))
}
break
case'enable_bootstrap':
console.log('In order to join AO public chatrooms, AO uses the hyperswarm protocol. Joining hyperswarm may expose your IP address to other users. (For high-security installations, don\'t use public bootstrap: you can still add tor addresses to your address book manually and join those chatrooms by name.)')
setAoEnv('PUBLIC_BOOTSTRAP_ENABLED',true)
//message: Type \'public\' and press Enter to enable:')
break
case'disable_bootstrap':
setAoEnv('PUBLIC_BOOTSTRAP_ENABLED',false)
console.log(roger(),'Disabled public bootstrapping.')
break
default:
returnfalse
}
returntrue
}
// Tells the AO server you are connected to connect to the AO server at the given .onion with the given connection secret string
// Any client logged in to the AO can tell it to connect to another AO. This could be a security issue if there is a bad actor server.
asyncfunctionconnectInteractive(){
constloggedIn=isLoggedIn()
console.log('The AO server you are logged in to can connect peer-to-peer via tor to another AO server to join chatrooms, send cards, and sync file attachments. Tor is Tor Onion Routing, a secure, end-to-end encrypted way of routing anonymized internet traffic.')
if(!isInstalled()){
console.log('It looks like your tor server isn\'t instaled and running. Go to Configure->Tor to set it up.')
returnfalse
}
constmemberId=aoEnv('AO_CLI_SESSION_MEMBERID')
if(!memberId){
console.log('Not logged in.')
returnfalse
}
console.log('To connect to another AO, you need it\'s Tor address, which ends in .onion, and its server secret. This information can be found on that AO\'s website. For convenience, it is combined in a single connection string separate by a colon. Please enter the entire string.')