Skip to content

Commit 37a3742

Browse files
madeyeclaude
andcommitted
Rename all https-proxy references to https_proxy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d46dde1 commit 37a3742

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ domain: "proxy.example.com"
5555
acme:
5656
email: "admin@example.com"
5757
staging: false
58-
cache_dir: "/var/lib/https-proxy/acme"
58+
cache_dir: "/var/lib/https_proxy/acme"
5959
users:
6060
- username: "alice"
6161
password: "hunter2"

config.example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ domain: "proxy.example.com"
33
acme:
44
email: "admin@example.com"
55
staging: false
6-
cache_dir: "/var/lib/https-proxy/acme"
6+
cache_dir: "/var/lib/https_proxy/acme"
77
users:
88
- username: "alice"
99
password: "hunter2"

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use https_proxy::config::Config;
1212
use https_proxy::handle_request;
1313

1414
#[derive(Parser)]
15-
#[command(name = "https-proxy", about = "Stealth HTTPS forward proxy")]
15+
#[command(name = "https_proxy", about = "Stealth HTTPS forward proxy")]
1616
struct Cli {
1717
#[command(subcommand)]
1818
command: Option<Command>,

src/service.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ use std::process::Command;
1111
use anyhow::{bail, Context};
1212

1313
/// Systemd service name used for the unit file and `systemctl` commands.
14-
const SERVICE_NAME: &str = "https-proxy";
14+
const SERVICE_NAME: &str = "https_proxy";
1515

1616
/// Install the proxy as a systemd service.
1717
///
1818
/// Performs the following steps:
19-
/// 1. Copies the current binary to `/usr/local/bin/https-proxy`
20-
/// 2. Copies the config file to `/etc/https-proxy/config.yaml`
21-
/// 3. Writes a systemd unit file to `/etc/systemd/system/https-proxy.service`
19+
/// 1. Copies the current binary to `/usr/local/bin/https_proxy`
20+
/// 2. Copies the config file to `/etc/https_proxy/config.yaml`
21+
/// 3. Writes a systemd unit file to `/etc/systemd/system/https_proxy.service`
2222
/// 4. Runs `systemctl daemon-reload`, `enable`, and `restart`
2323
///
2424
/// Requires root privileges.
@@ -46,9 +46,9 @@ pub fn install_service(config_path: String) -> anyhow::Result<()> {
4646
fs::copy(&exe, &installed_bin)
4747
.with_context(|| format!("failed to copy binary to {}", installed_bin.display()))?;
4848

49-
// Copy config to /etc/https-proxy/
50-
let config_dir = Path::new("/etc/https-proxy");
51-
fs::create_dir_all(config_dir).context("failed to create /etc/https-proxy/")?;
49+
// Copy config to /etc/https_proxy/
50+
let config_dir = Path::new("/etc/https_proxy");
51+
fs::create_dir_all(config_dir).context("failed to create /etc/https_proxy/")?;
5252
let installed_config = config_dir.join("config.yaml");
5353
println!("Installing config to {}", installed_config.display());
5454
fs::copy(&config, &installed_config)
@@ -81,7 +81,7 @@ pub fn install_service(config_path: String) -> anyhow::Result<()> {
8181
/// Uninstall the systemd service.
8282
///
8383
/// Stops and disables the service, removes the binary and unit file, but
84-
/// preserves `/etc/https-proxy/` (user configuration). Requires root.
84+
/// preserves `/etc/https_proxy/` (user configuration). Requires root.
8585
pub fn uninstall_service() -> anyhow::Result<()> {
8686
if !cfg!(target_os = "linux") {
8787
bail!("service uninstallation is only supported on Linux with systemd");
@@ -101,8 +101,8 @@ pub fn uninstall_service() -> anyhow::Result<()> {
101101
}
102102
}
103103

104-
// Keep /etc/https-proxy/ config dir (user data)
105-
println!("Config directory /etc/https-proxy/ preserved.");
104+
// Keep /etc/https_proxy/ config dir (user data)
105+
println!("Config directory /etc/https_proxy/ preserved.");
106106

107107
run_cmd("systemctl", &["daemon-reload"])?;
108108

src/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ impl SetupApp {
8585
domain: String::new(),
8686
acme_email: String::new(),
8787
acme_staging: false,
88-
acme_cache_dir: "/var/lib/https-proxy/acme".into(),
88+
acme_cache_dir: "/var/lib/https_proxy/acme".into(),
8989
stealth_server_name: "nginx/1.24.0".into(),
9090
users: Vec::new(),
9191
user_add: None,

0 commit comments

Comments
 (0)