Maggie

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: SetPacketFilterTable issue #12993
    Maggie
    Participant

      I try https://github.com/wiresock/ndisapi/blob/master/examples/cpp/udp2tcp/udp2tcp.cpp
      bool load_filters(const CNdisApi& api, const bool is_server, const uint16_t port)
      {….
      }

      it return false on version 3.4.0.1 as well

      in reply to: SetPacketFilterTable issue #12991
      Maggie
      Participant

        PSTATIC_FILTER_TABLE g_pFilters = NULL;
        HANDLE g_hAdapter = NULL;
        u_short g_uPort = 12345;

        bool CreateFilter(HANDLE hAdapter)
        {
        DWORD dwRuleCount = 1;
        DWORD dwTableSize = sizeof(STATIC_FILTER_TABLE) + sizeof(STATIC_FILTER) * (dwRuleCount + 1) * 2;
        g_pFilters = (PSTATIC_FILTER_TABLE)malloc(dwTableSize);

        if (NULL == g_pFilters)
        {
        return false;
        }
        memset(g_pFilters,0,dwTableSize);

        bool Is64OS = Is64BitOS();

        g_pFilters->m_TableSize = dwRuleCount * 2 + 1;
        DWORD dwIndex = 0;
        if (Is64OS)
        {
        g_pFilters->m_StaticFilters[dwIndex].m_Adapter.QuadPart = (ULONGLONG)hAdapter;
        }
        else
        {
        g_pFilters->m_StaticFilters[dwIndex].m_Adapter.LowPart = (ULONG)hAdapter;
        }
        g_pFilters->m_StaticFilters[dwIndex].m_ValidFields = NETWORK_LAYER_VALID | TRANSPORT_LAYER_VALID;
        g_pFilters->m_StaticFilters[dwIndex].m_FilterAction = FILTER_PACKET_REDIRECT;
        g_pFilters->m_StaticFilters[dwIndex].m_dwDirectionFlags = PACKET_FLAG_ON_RECEIVE;

        // Network layer filter
        g_pFilters->m_StaticFilters[dwIndex].m_NetworkFilter.m_dwUnionSelector = IPV4;
        g_pFilters->m_StaticFilters[dwIndex].m_NetworkFilter.m_IPv4.m_ValidFields = IP_V4_FILTER_PROTOCOL;
        g_pFilters->m_StaticFilters[dwIndex].m_NetworkFilter.m_IPv4.m_Protocol = IPPROTO_TCP;

        if (g_uPort > 0)
        {
        g_pFilters->m_StaticFilters[dwIndex].m_TransportFilter.m_dwUnionSelector = TCPUDP;
        g_pFilters->m_StaticFilters[dwIndex].m_TransportFilter.m_TcpUdp.m_ValidFields = TCPUDP_DEST_PORT;
        g_pFilters->m_StaticFilters[dwIndex].m_TransportFilter.m_TcpUdp.m_DestPort.m_StartRange = g_uPort;
        g_pFilters->m_StaticFilters[dwIndex].m_TransportFilter.m_TcpUdp.m_DestPort.m_EndRange = g_uPort;
        }

        dwIndex++;

        g_pFilters->m_StaticFilters[dwIndex].m_Adapter.QuadPart = 0;
        g_pFilters->m_StaticFilters[dwIndex].m_ValidFields = 0;
        g_pFilters->m_StaticFilters[dwIndex].m_FilterAction = FILTER_PACKET_PASS;
        g_pFilters->m_StaticFilters[dwIndex].m_dwDirectionFlags = PACKET_FLAG_ON_RECEIVE | PACKET_FLAG_ON_SEND;
        return true;
        }

        void Start()
        {
        …………………………..
        ………………………..
        if (!CreateFilter(g_hAdapter))
        {
        printf(“Fail To Create Filter\n”);
        return false;
        }

        if (!SetPacketFilterTable(g_pFilters))
        {
        printf(“Fail To Set Packet Filter\n”);
        return false;
        }
        }

        filter table changed on latest version or SetPacketFilterTable changed?

        in reply to: debug wiresock and dns #12856
        Maggie
        Participant

          The method to bypass the Egyps wireguard vpn blocking won’t work any more,I just tested it.

          in reply to: debug wiresock and dns #12855
          Maggie
          Participant

            Egypt host blocks wireguard(both Nat and proxy mode),however,socks5 works fine,I wonder why

            in reply to: wiresock vpn gateway new error #12851
            Maggie
            Participant

              BTW,is it any quick method or tools to detect if the ISP blocks UDP or not,since some ISP may block the UDP protocol so wireguard won’t work at all.It would be nice to do so before to install wireguard.

              in reply to: wiresock vpn gateway new error #12849
              Maggie
              Participant

                It’s Windows Server 2016 X64

                in reply to: wiresock vpn gateway install issue #12842
                Maggie
                Participant

                  It’s not installed yet,reboot and same result.BTW,wiresock vpn gateway won’t work on windows 2008 R2,after  successfully install,the ndis driver won’t work,after a reboot,the system just die I doubt it may be related to the driver digital signing. The older version like winpkfilter 3.7.6.X works fine on windows 2008,but the latest version or even 3.3X version,won’t work on server 2008

                  in reply to: wiresock vpn gateway install issue #12840
                  Maggie
                  Participant

                     

                    how about this sort of error

                    in reply to: wiresock vpn gateway install issue #12835
                    Maggie
                    Participant

                      well,I am wrong about my assumption on my first post,it won’t matter public IP or not,most of my test failed,only 2 success out of 10.most case failure on installing the wireguard turnnel(“wireguard.exe” /installtunnelservice “full path of config file”).I am sure the configuration files are all in the path “C:\ProgramData\NT Kernel Resources\WireSock VPN Gateway”,wiresock.conf,wsclient_1.conf and config.json.

                      in reply to: wiresock vpn gateway install issue #12834
                      Maggie
                      Participant

                        failure on other server with one NIC and internal IP

                        Starting Wireguard tunnel…

                        Installing Wireguard tunnel:
                        StdOut : ”
                        StdErr: ‘& : The term ‘wireguard.exe’ is not recognized as the name of a cmdlet, function, script file, or operable program.
                        Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
                        At line:1 char:2
                        + &”wireguard.exe” /installtunnelservice “C:\ProgramData\NT Kernel Reso …
                        + ~~~~~~~~~~~~~~~
                        + CategoryInfo : ObjectNotFound: (wireguard.exe:String) [], CommandNotFoundException
                        + FullyQualifiedErrorId : CommandNotFoundException

                        in reply to: wiresock vpn gateway install issue #12833
                        Maggie
                        Participant

                          Starting Wireguard tunnel…

                          Installing Wireguard tunnel:
                          StdOut : ”
                          tdErr: ‘S t a r t i n g t h e C L R f a i l e d w i t h H R E S U L T 8 0 0 7 0 0 0 5 .

                          in reply to: wiresock vpn gateway install issue #12831
                          Maggie
                          Participant

                            the error is when wg-quick-config -add -start trying to install the wireguard tunnel,it fails,I try to post the error message here,it won’t let me saying “xxxx seem like spam”

                          Viewing 12 posts - 1 through 12 (of 12 total)