Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gateway/src/https_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use axum::routing::get;
use axum::Router;
use axum_server::tls_rustls::RustlsConfig;
use clap::Args;
use common::enums::ZtmType;
use regex::Regex;
use tower::ServiceBuilder;
use tower_http::cors::{Any, CorsLayer};
Expand All @@ -22,6 +21,7 @@ use tower_http::trace::TraceLayer;

use ceres::lfs::LfsConfig;
use ceres::protocol::{SmartProtocol, TransportProtocol};
use common::enums::ZtmType;
use common::config::Config;
use common::model::{CommonOptions, GetParams};
use jupiter::context::Context;
Expand Down
14 changes: 8 additions & 6 deletions gateway/src/relay_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ use axum::extract::{Query, State};
use axum::http::{Request, Response, StatusCode, Uri};
use axum::routing::get;
use axum::Router;
use common::config::{Config, ZTMConfig};
use gemini::ztm::{
connect_ztm_hub, create_ztm_certificate, create_ztm_service, delete_ztm_certificate,
};
use gemini::RelayGetParams;
use jupiter::context::Context;
use regex::Regex;
use tower::ServiceBuilder;
use tower_http::cors::{Any, CorsLayer};
Expand All @@ -21,6 +15,14 @@ use tower_http::trace::TraceLayer;
use crate::api_service;
use crate::api_service::router::ApiServiceState;

use common::config::{Config, ZTMConfig};
use gemini::RelayGetParams;
use jupiter::context::Context;
use gemini::ztm::{
connect_ztm_hub, create_ztm_certificate, create_ztm_service, delete_ztm_certificate,
};


pub async fn run_relay_server(config: Config, host: String, port: u16) {
let app = app(config.clone(), host.clone(), port).await;

Expand Down
3 changes: 2 additions & 1 deletion gemini/src/ztm/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use common::config::ZTMConfig;
use reqwest::{header::CONTENT_TYPE, Client};
use serde::{Deserialize, Serialize};

use common::config::ZTMConfig;

#[derive(Deserialize, Serialize, Debug)]
pub struct ZTMUserPermit {
pub ca: String,
Expand Down
10 changes: 10 additions & 0 deletions mega/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,20 @@ use common::{

use crate::commands::{builtin, builtin_exec};

/// This function is responsible for parsing command line arguments.
/// It uses the `cli` function to get the matches for the command line arguments.
/// If the matches are not found, it will exit the program.
///
/// # Returns
///
/// This function returns a `MegaResult`. If the parsing is successful, it will return the result.
/// If there is an error during the parsing, it will return an error.
pub fn parse() -> MegaResult {
let matches = cli().try_get_matches().unwrap_or_else(|e| e.exit());

// Get the current directory
let current_dir = env::current_dir()?;
// Get the path to the config file in the current directory
let config_path = current_dir.join("config.toml");

let config = if let Some(path) = matches.get_one::<String>("config").cloned() {
Expand Down
2 changes: 1 addition & 1 deletion scorpio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ edition = "2021"
[dependencies]
fuser = "0.14.0"
libc = "0.2.155"
tracing = { workspace = true }
tracing = { workspace = true }
18 changes: 13 additions & 5 deletions scorpio/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
## Scorpio Module
## Scorpio - FUSE Support for Mega/Monorepo Client

>**FUSE Support for Mega/Monorepo Client.♏**
### What's the Fuse?

🚧 Developing annd Coming Soon...

## Fuse?
FUSE is the abbreviation for "FileSystem in Userspace".

### Why the Mega Need a FUSE?


### How to Use?


### How to Contribute?


### Reference