Skip to content

Commit

Permalink
Merge pull request #22 from DanGould/fix-nixos-test
Browse files Browse the repository at this point in the history
Fix nixos test
  • Loading branch information
DanGould authored Feb 22, 2024
2 parents 9f3214b + 6fb0d06 commit bf461c3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ohttp-relay"
version = "0.0.2"
version = "0.0.3"
authors = ["Dan Gould <d@ngould.dev>"]
description = "Relay Oblivious HTTP requests to protect IP metadata"
repository = "https://github.com/payjoin/ohttp-relay"
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ mod test {

use super::*;

static GATEWAY_ORIGIN: Lazy<Uri> = Lazy::new(|| Uri::from_static("https://gateway.com"));
static GATEWAY_ORIGIN: Lazy<Uri> = Lazy::new(|| Uri::from_static("https://0.0.0.0:8080"));

#[test]
fn mismatched_gateways_not_allowed() {
let not_gateway_origin = "https://not-gateway.com";
let not_gateway_origin = "https://0.0.0.0:8081";
let req = hyper::Request::builder().uri(not_gateway_origin).body(()).unwrap();
let allowable_gateway = find_allowable_gateway(&req, &*GATEWAY_ORIGIN);
assert!(allowable_gateway.is_none());
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pub async fn listen_tcp(
port: u16,
gateway_origin: Uri,
) -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
let addr = SocketAddr::from(([127, 0, 0, 1], port));
let addr = SocketAddr::from(([0, 0, 0, 0], port));
let listener = TcpListener::bind(addr).await?;
println!("OHTTP relay listening on tcp://{}", addr);
ohttp_relay(listener, gateway_origin).await
Expand Down

0 comments on commit bf461c3

Please sign in to comment.