@@ -480,6 +480,7 @@ cfg_if! {
480
480
/// Document: <https://www.freebsd.org/doc/handbook/firewalls-pf.html>
481
481
#[ cfg( any(
482
482
target_os = "freebsd" ,
483
+ target_os = "openbsd" ,
483
484
target_os = "macos" ,
484
485
target_os = "ios"
485
486
) ) ]
@@ -544,6 +545,30 @@ cfg_if! {
544
545
const AVAILABLE_TYPES : & [ & str ] = & [ RedirType :: PacketFilter . name( ) , RedirType :: IpFirewall . name( ) ] ;
545
546
AVAILABLE_TYPES
546
547
}
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
+ }
547
572
} else if #[ cfg( any( target_os = "macos" , target_os = "ios" ) ) ] {
548
573
/// Default TCP transparent proxy solution on this platform
549
574
pub fn tcp_default( ) -> RedirType {
@@ -614,6 +639,7 @@ cfg_if! {
614
639
615
640
#[ cfg( any(
616
641
target_os = "freebsd" ,
642
+ target_os = "openbsd" ,
617
643
target_os = "macos" ,
618
644
target_os = "ios"
619
645
) ) ]
@@ -654,6 +680,7 @@ cfg_if! {
654
680
655
681
#[ cfg( any(
656
682
target_os = "freebsd" ,
683
+ target_os = "openbsd" ,
657
684
target_os = "macos" ,
658
685
target_os = "ios" ,
659
686
) ) ]
0 commit comments