document proxy setup in guide/secure.md (for #26)

The guide is not as quick to follow and amateur-friendly as I'd like. A
few things that might improve matters:

   * complete #27 (built-in https+letsencrypt), so that when not sharing
     the port, users don't need to use nginx or certbot.
   * more ubiquitous IPv6 (out of my control but should happen over
     time) to reduce need to share the port
   * embed a dynamic DNS client
   * support UPnP Internet Gateway Device Control Protocol (if common
     routers have this enabled? probably not for security reasons.)

It's progress, though. Enough that I think I'll merge the auth branch
into master shortly.
This commit is contained in:
Scott Lamb
2018-12-27 16:00:15 -06:00
parent 3c1163dfe2
commit 24674f5b50
7 changed files with 288 additions and 11 deletions

View File

@@ -194,5 +194,5 @@ pub fn top_dialog(db: &Arc<db::Database>, siv: &mut Cursive) {
.map(|(&id, user)| (format!("{}: {}", id, user.username), Some(id))))
.full_width())
.dismiss_button("Done")
.title("Edit cameras"));
.title("Edit users"));
}

View File

@@ -486,8 +486,11 @@ impl ServiceInner {
fn request(&self, req: &Request<::hyper::Body>) -> ResponseResult {
let authreq = self.authreq(req);
let host = req.headers().get(header::HOST).map(|h| String::from_utf8_lossy(h.as_bytes()));
let agent = authreq.user_agent.as_ref().map(|u| String::from_utf8_lossy(&u[..]));
Ok(plain_response(StatusCode::OK, format!(
"when: {}\n\
host: {:?}\n\
addr: {:?}\n\
user_agent: {:?}\n\
secure: {:?}",
@@ -495,8 +498,9 @@ impl ServiceInner {
.strftime("%FT%T")
.map(|f| f.to_string())
.unwrap_or_else(|e| e.to_string()),
host.as_ref().map(|h| &*h),
&authreq.addr,
authreq.user_agent.map(|u| String::from_utf8_lossy(&u[..]).into_owned()),
agent.as_ref().map(|a| &*a),
self.is_secure(req))))
}