ソースを参照

IPv6 inbound support

bdbai 2 年 前
コミット
636aaf615d
2 ファイル変更9 行追加5 行削除
  1. 8 4
      Maple.Task/VpnPlugin.cpp
  2. 1 1
      leaf

+ 8 - 4
Maple.Task/VpnPlugin.cpp

@@ -70,12 +70,16 @@ namespace winrt::Maple_Task::implementation
 
         VpnRouteAssignment routeScope{};
         routeScope.ExcludeLocalSubnets(true);
-        routeScope.Ipv4InclusionRoutes(std::vector<VpnRoute>{
+        routeScope.Ipv4InclusionRoutes(std::vector{
             // 直接写 0.0.0.0/0 哪怕绑了接口也会绕回环
             // VpnRoute(HostName{ L"0.0.0.0" }, 0)
             VpnRoute(HostName{ L"0.0.0.0" }, 1),
                 VpnRoute(HostName{ L"128.0.0.0" }, 1),
-        });
+            });
+        routeScope.Ipv6InclusionRoutes(std::vector{
+            VpnRoute(HostName{L"::"}, 1),
+            VpnRoute(HostName{L"8000::"}, 1)
+            });
         // 排除代理服务器的话就会 os 10023 以一种访问权限不允许的方式做了一个访问套接字的尝试
         // routeScope.Ipv4ExclusionRoutes(std::vector<VpnRoute>{
         //     VpnRoute(HostName{ L"172.25.0.0" }, 16)
@@ -161,8 +165,8 @@ namespace winrt::Maple_Task::implementation
             single_threaded_vector(std::vector<HostName>())));
 
         channel.StartWithMainTransport(
-            std::vector<HostName> { HostName{ L"192.168.3.1" } },
-            nullptr,
+            std::vector{ HostName{ L"192.168.3.1" } },
+            std::vector{ HostName{L"fd00::2"} },
             nullptr,
             routeScope,
             dnsAssignment,

+ 1 - 1
leaf

@@ -1 +1 @@
-Subproject commit 94e4c61c33434462f64cfcb0958052861f824f1d
+Subproject commit 3ee28a0c7c3f2118bcf7caffe3dfe223347ac660