Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "daily"
cooldown:
default-days: 7
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
cooldown:
default-days: 7
36 changes: 0 additions & 36 deletions .github/workflows/build.yml

This file was deleted.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "proxy-protocol"
version = "0.5.0"
authors = ["Mariell Hoversholm <proximyst@proximyst.com>"]
edition = "2018"
version = "0.5.1"
authors = ["Gen0Sec <support@gen0sec.com>"]
edition = "2024"

license = "MIT OR Apache-2.0"
description = "PROXY protocol serializer and deserializer"
documentation = "https://docs.rs/proxy-protocol/"
repository = "https://github.com/Proximyst/proxy-protocol.git"
repository = "https://github.com/gen0sec/proxy-protocol"
keywords = ["proxy", "proxy-protocol", "haproxy", "networking"]
categories = ["network-programming", "parser-implementations"]
links = "proxy-protocol"
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub mod version1;
pub mod version2;

use bytes::{Buf, BytesMut};
use snafu::{ensure, ResultExt as _, Snafu};
use snafu::{ResultExt as _, Snafu, ensure};

#[derive(Debug, Snafu)]
#[cfg_attr(not(feature = "always_exhaustive"), non_exhaustive)] // A new version may be added
Expand Down Expand Up @@ -94,7 +94,9 @@ fn parse_version(buf: &mut impl Buf) -> Result<u32, ParseError> {
ensure!(buf.remaining() >= 13, NotProxyHeaderSnafu);
ensure!(
buf.chunk()[..12]
== [0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A],
== [
0x0D, 0x0A, 0x0D, 0x0A, 0x00, 0x0D, 0x0A, 0x51, 0x55, 0x49, 0x54, 0x0A
],
NotProxyHeaderSnafu
);
buf.advance(12);
Expand Down
2 changes: 1 addition & 1 deletion src/version1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bytes::{Buf, BufMut as _, BytesMut};
use snafu::{ensure, OptionExt as _, ResultExt as _, Snafu};
use snafu::{OptionExt as _, ResultExt as _, Snafu, ensure};
use std::{
io::Write as _,
net::{AddrParseError, IpAddr, Ipv4Addr, Ipv6Addr, SocketAddrV4, SocketAddrV6},
Expand Down
2 changes: 1 addition & 1 deletion src/version2.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use bytes::{Buf, BufMut as _, BytesMut};
use snafu::{ensure, Snafu};
use snafu::{Snafu, ensure};
use std::convert::TryInto;
use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr, SocketAddrV4, SocketAddrV6};

Expand Down