@@ -487,6 +487,7 @@ cfg_if! {
487
487
/// Document: <https://www.freebsd.org/doc/handbook/firewalls-pf.html>
488
488
#[ cfg( any(
489
489
target_os = "freebsd" ,
490
+ target_os = "openbsd" ,
490
491
target_os = "macos" ,
491
492
target_os = "ios"
492
493
) ) ]
@@ -551,6 +552,30 @@ cfg_if! {
551
552
const AVAILABLE_TYPES : & [ & str ] = & [ RedirType :: PacketFilter . name( ) , RedirType :: IpFirewall . name( ) ] ;
552
553
AVAILABLE_TYPES
553
554
}
555
+ } else if #[ cfg( target_os = "openbsd" ) ] {
556
+ /// Default TCP transparent proxy solution on this platform
557
+ pub fn tcp_default( ) -> RedirType {
558
+ RedirType :: PacketFilter
559
+ }
560
+
561
+ /// Available TCP transparent proxy types
562
+ #[ doc( hidden) ]
563
+ pub fn tcp_available_types( ) -> & ' static [ & ' static str ] {
564
+ const AVAILABLE_TYPES : & [ & str ] = & [ RedirType :: PacketFilter . name( ) ] ;
565
+ AVAILABLE_TYPES
566
+ }
567
+
568
+ /// Default UDP transparent proxy solution on this platform
569
+ pub fn udp_default( ) -> RedirType {
570
+ RedirType :: PacketFilter
571
+ }
572
+
573
+ /// Available UDP transparent proxy types
574
+ #[ doc( hidden) ]
575
+ pub const fn udp_available_types( ) -> & ' static [ & ' static str ] {
576
+ const AVAILABLE_TYPES : & [ & str ] = & [ RedirType :: PacketFilter . name( ) ] ;
577
+ AVAILABLE_TYPES
578
+ }
554
579
} else if #[ cfg( any( target_os = "macos" , target_os = "ios" ) ) ] {
555
580
/// Default TCP transparent proxy solution on this platform
556
581
pub fn tcp_default( ) -> RedirType {
@@ -621,6 +646,7 @@ cfg_if! {
621
646
622
647
#[ cfg( any(
623
648
target_os = "freebsd" ,
649
+ target_os = "openbsd" ,
624
650
target_os = "macos" ,
625
651
target_os = "ios"
626
652
) ) ]
@@ -661,6 +687,7 @@ cfg_if! {
661
687
662
688
#[ cfg( any(
663
689
target_os = "freebsd" ,
690
+ target_os = "openbsd" ,
664
691
target_os = "macos" ,
665
692
target_os = "ios" ,
666
693
) ) ]
0 commit comments