Support for remote browser. Useful for headless servers (#544)

* Support for remote browser. Useful for headless servers

* feat: enhance browser authentication to support remote mode and local IP detection

---------

Co-authored-by: Kevin Yue <[email protected]>
This commit is contained in:
Dark12andKevin Yue authored and GitHub committed 2025-10-12 22:02:19 +08:00
1 parent a9d2de06b5
commit e1eb191def
4 files changed
+62 -6

No files matched your search

+2 -2
View File
@@ -10,8 +10,8 @@ pub(super) struct AuthServer {
}
impl AuthServer {
pub fn new() -> anyhow::Result<Self> {
let server = Server::http("127.0.0.1:0").map_err(|err| anyhow::anyhow!(err))?;
pub fn new(addr: &str) -> anyhow::Result<Self> {
let server = Server::http(addr).map_err(|err| anyhow::anyhow!(err))?;
let auth_id = Uuid::new_v4().to_string();
Ok(Self { server, auth_id })