mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
prep for prod infrastructure defaults
This commit is contained in:
committed by
Aiden McClelland
parent
c38d6083aa
commit
3c3dab2312
@@ -145,13 +145,11 @@ impl RpcContext {
|
||||
) -> Result<Self, Error> {
|
||||
let base = RpcContextConfig::load(cfg_path).await?;
|
||||
tracing::info!("Loaded Config");
|
||||
let log_epoch = Arc::new(AtomicU64::new(rand::random()));
|
||||
let tor_proxy = base.tor_socks.unwrap_or(SocketAddr::V4(SocketAddrV4::new(
|
||||
Ipv4Addr::new(127, 0, 0, 1),
|
||||
9050,
|
||||
)));
|
||||
let logger = EmbassyLogger::init(
|
||||
log_epoch.clone(),
|
||||
base.log_server.clone(),
|
||||
false,
|
||||
tor_proxy.ip(),
|
||||
|
||||
@@ -50,7 +50,7 @@ impl Database {
|
||||
.parse()
|
||||
.unwrap(),
|
||||
status: ServerStatus::Running {},
|
||||
eos_marketplace: "https://beta-registry-0-3.start9labs.com".parse().unwrap(),
|
||||
eos_marketplace: "https://registry.start9.com".parse().unwrap(),
|
||||
package_marketplace: None,
|
||||
wifi: WifiInfo {
|
||||
ssids: Vec::new(),
|
||||
|
||||
@@ -105,7 +105,7 @@ server {{
|
||||
}}
|
||||
|
||||
location /marketplace/ {{
|
||||
proxy_pass https://beta-registry-0-3.start9labs.com/; # TODO
|
||||
proxy_pass {package_marketplace}/;
|
||||
}}
|
||||
|
||||
location / {{
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
use std::net::IpAddr;
|
||||
use std::net::{IpAddr, Ipv4Addr};
|
||||
use std::sync::atomic::{AtomicBool, AtomicU64, Ordering};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use lazy_static::lazy_static;
|
||||
use reqwest::{Client, Proxy, Url};
|
||||
use serde::Serialize;
|
||||
use tracing::Subscriber;
|
||||
@@ -103,14 +104,14 @@ impl EmbassyLogger {
|
||||
.with(ErrorLayer::default())
|
||||
}
|
||||
pub fn no_sharing() {
|
||||
Self::init(None, false, IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 9050);
|
||||
let _ = Self::init(None, false, IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 9050);
|
||||
}
|
||||
pub fn init(
|
||||
share_dest: Option<Url>,
|
||||
share_errors: bool,
|
||||
tor_proxy_ip: IpAddr,
|
||||
tor_proxy_port: u16,
|
||||
) -> Self {
|
||||
) -> Result<Self, Error> {
|
||||
use tracing_subscriber::prelude::*;
|
||||
|
||||
let mut guard = LOGGER.lock().unwrap();
|
||||
@@ -121,7 +122,7 @@ impl EmbassyLogger {
|
||||
let log_epoch = Arc::new(AtomicU64::new(rand::random()));
|
||||
let sharing = Arc::new(AtomicBool::new(share_errors));
|
||||
let share_dest = match share_dest {
|
||||
None => "https://beta-registry-0-3.start9labs.com/error-logs".to_owned(), // TODO
|
||||
None => "http://registry.privacy34kn4ez3y3nijweec6w4g54i3g54sdv7r5mr6soma3w4begyd.onion/support/error-logs".to_owned(),
|
||||
Some(a) => a.to_string(),
|
||||
};
|
||||
let tor_proxy = Client::builder()
|
||||
|
||||
Reference in New Issue
Block a user