@@ -480,6 +480,7 @@ cfg_if! {
480480 /// Document: <https://www.freebsd.org/doc/handbook/firewalls-pf.html>
481481 #[ cfg( any(
482482 target_os = "freebsd" ,
483+ target_os = "openbsd" ,
483484 target_os = "macos" ,
484485 target_os = "ios"
485486 ) ) ]
@@ -544,6 +545,30 @@ cfg_if! {
544545 const AVAILABLE_TYPES : & [ & str ] = & [ RedirType :: PacketFilter . name( ) , RedirType :: IpFirewall . name( ) ] ;
545546 AVAILABLE_TYPES
546547 }
548+ } else if #[ cfg( target_os = "openbsd" ) ] {
549+ /// Default TCP transparent proxy solution on this platform
550+ pub fn tcp_default( ) -> RedirType {
551+ RedirType :: PacketFilter
552+ }
553+
554+ /// Available TCP transparent proxy types
555+ #[ doc( hidden) ]
556+ pub fn tcp_available_types( ) -> & ' static [ & ' static str ] {
557+ const AVAILABLE_TYPES : & [ & str ] = & [ RedirType :: PacketFilter . name( ) ] ;
558+ AVAILABLE_TYPES
559+ }
560+
561+ /// Default UDP transparent proxy solution on this platform
562+ pub fn udp_default( ) -> RedirType {
563+ RedirType :: PacketFilter
564+ }
565+
566+ /// Available UDP transparent proxy types
567+ #[ doc( hidden) ]
568+ pub const fn udp_available_types( ) -> & ' static [ & ' static str ] {
569+ const AVAILABLE_TYPES : & [ & str ] = & [ RedirType :: PacketFilter . name( ) ] ;
570+ AVAILABLE_TYPES
571+ }
547572 } else if #[ cfg( any( target_os = "macos" , target_os = "ios" ) ) ] {
548573 /// Default TCP transparent proxy solution on this platform
549574 pub fn tcp_default( ) -> RedirType {
@@ -614,6 +639,7 @@ cfg_if! {
614639
615640 #[ cfg( any(
616641 target_os = "freebsd" ,
642+ target_os = "openbsd" ,
617643 target_os = "macos" ,
618644 target_os = "ios"
619645 ) ) ]
@@ -654,6 +680,7 @@ cfg_if! {
654680
655681 #[ cfg( any(
656682 target_os = "freebsd" ,
683+ target_os = "openbsd" ,
657684 target_os = "macos" ,
658685 target_os = "ios" ,
659686 ) ) ]
0 commit comments