mirror of
https://github.com/YGGverse/btracker-gemini.git
synced 2026-03-31 17:15:30 +00:00
require valid SocketAddr
This commit is contained in:
parent
91186b8641
commit
bdc5496d45
1 changed files with 6 additions and 3 deletions
|
|
@ -1,12 +1,15 @@
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use std::path::PathBuf;
|
use std::{
|
||||||
|
net::{Ipv4Addr, SocketAddr, SocketAddrV4},
|
||||||
|
path::PathBuf,
|
||||||
|
};
|
||||||
|
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(version, about, long_about = None)]
|
#[command(version, about, long_about = None)]
|
||||||
pub struct Argument {
|
pub struct Argument {
|
||||||
/// Bind server `host:port` to listen incoming connections on it
|
/// Bind server `host:port` to listen incoming connections on it
|
||||||
#[arg(short, long, default_value_t = std::net::SocketAddrV4::new(std::net::Ipv4Addr::LOCALHOST, 1965).to_string())]
|
#[arg(short, long, default_value_t = SocketAddr::V4(SocketAddrV4::new(Ipv4Addr::LOCALHOST, 1965)))]
|
||||||
pub bind: String,
|
pub bind: SocketAddr,
|
||||||
|
|
||||||
/// Filepath to server identity in PKCS (PFX) format
|
/// Filepath to server identity in PKCS (PFX) format
|
||||||
#[arg(short, long)]
|
#[arg(short, long)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue