Get IP address of domain or make DNS request using WebAssembly












0















Is it possible to use WebAssembly to make DNS requests or get the IP address of a domain name? If not in a website, what about through a browser plugin?



I've seen that JavaScript doesn't allow making DNS requests or even grabbing the current IP of the domain you've connected even though the browser itself has that data.



I've also seen you can make DNS requests in Node.js so I wonder, because WebAssembly has a different feature-set from in-browser JS, does it also have some server-side capabilities that would allow for either making DNS requests or listening in on the browsers' DNS responses?










share|improve this question



























    0















    Is it possible to use WebAssembly to make DNS requests or get the IP address of a domain name? If not in a website, what about through a browser plugin?



    I've seen that JavaScript doesn't allow making DNS requests or even grabbing the current IP of the domain you've connected even though the browser itself has that data.



    I've also seen you can make DNS requests in Node.js so I wonder, because WebAssembly has a different feature-set from in-browser JS, does it also have some server-side capabilities that would allow for either making DNS requests or listening in on the browsers' DNS responses?










    share|improve this question

























      0












      0








      0








      Is it possible to use WebAssembly to make DNS requests or get the IP address of a domain name? If not in a website, what about through a browser plugin?



      I've seen that JavaScript doesn't allow making DNS requests or even grabbing the current IP of the domain you've connected even though the browser itself has that data.



      I've also seen you can make DNS requests in Node.js so I wonder, because WebAssembly has a different feature-set from in-browser JS, does it also have some server-side capabilities that would allow for either making DNS requests or listening in on the browsers' DNS responses?










      share|improve this question














      Is it possible to use WebAssembly to make DNS requests or get the IP address of a domain name? If not in a website, what about through a browser plugin?



      I've seen that JavaScript doesn't allow making DNS requests or even grabbing the current IP of the domain you've connected even though the browser itself has that data.



      I've also seen you can make DNS requests in Node.js so I wonder, because WebAssembly has a different feature-set from in-browser JS, does it also have some server-side capabilities that would allow for either making DNS requests or listening in on the browsers' DNS responses?







      javascript browser dns cross-browser webassembly






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 2:03









      SawtaytoesSawtaytoes

      1,99711732




      1,99711732
























          1 Answer
          1






          active

          oldest

          votes


















          1














          No.
          There is no API exclusively for WebAssembly. The MVP spec has even no stable application API nor built-in libraries for WebAssembly (they are working on adding some as post-MVP features). WebAssembly binaries itself can only do pure computations for now.



          Currently it is safe to assume that all system functions are implemented through emulating using Javascript. Specifically, they are done by importing JS code in to WebAssembly modules. So what the JS engine cannot is what WebAssembly cannot.



          Security is their main concerns. The WebAssembly team adding more system features but they mainly focus on computation features such as threading and SIMD rather than exclusive system features that might break the sandbox. So I don't expect they are going to add low-level access, such as manipulating DNS requests and exposing real filesystem on browsers.






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53404331%2fget-ip-address-of-domain-or-make-dns-request-using-webassembly%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            No.
            There is no API exclusively for WebAssembly. The MVP spec has even no stable application API nor built-in libraries for WebAssembly (they are working on adding some as post-MVP features). WebAssembly binaries itself can only do pure computations for now.



            Currently it is safe to assume that all system functions are implemented through emulating using Javascript. Specifically, they are done by importing JS code in to WebAssembly modules. So what the JS engine cannot is what WebAssembly cannot.



            Security is their main concerns. The WebAssembly team adding more system features but they mainly focus on computation features such as threading and SIMD rather than exclusive system features that might break the sandbox. So I don't expect they are going to add low-level access, such as manipulating DNS requests and exposing real filesystem on browsers.






            share|improve this answer






























              1














              No.
              There is no API exclusively for WebAssembly. The MVP spec has even no stable application API nor built-in libraries for WebAssembly (they are working on adding some as post-MVP features). WebAssembly binaries itself can only do pure computations for now.



              Currently it is safe to assume that all system functions are implemented through emulating using Javascript. Specifically, they are done by importing JS code in to WebAssembly modules. So what the JS engine cannot is what WebAssembly cannot.



              Security is their main concerns. The WebAssembly team adding more system features but they mainly focus on computation features such as threading and SIMD rather than exclusive system features that might break the sandbox. So I don't expect they are going to add low-level access, such as manipulating DNS requests and exposing real filesystem on browsers.






              share|improve this answer




























                1












                1








                1







                No.
                There is no API exclusively for WebAssembly. The MVP spec has even no stable application API nor built-in libraries for WebAssembly (they are working on adding some as post-MVP features). WebAssembly binaries itself can only do pure computations for now.



                Currently it is safe to assume that all system functions are implemented through emulating using Javascript. Specifically, they are done by importing JS code in to WebAssembly modules. So what the JS engine cannot is what WebAssembly cannot.



                Security is their main concerns. The WebAssembly team adding more system features but they mainly focus on computation features such as threading and SIMD rather than exclusive system features that might break the sandbox. So I don't expect they are going to add low-level access, such as manipulating DNS requests and exposing real filesystem on browsers.






                share|improve this answer















                No.
                There is no API exclusively for WebAssembly. The MVP spec has even no stable application API nor built-in libraries for WebAssembly (they are working on adding some as post-MVP features). WebAssembly binaries itself can only do pure computations for now.



                Currently it is safe to assume that all system functions are implemented through emulating using Javascript. Specifically, they are done by importing JS code in to WebAssembly modules. So what the JS engine cannot is what WebAssembly cannot.



                Security is their main concerns. The WebAssembly team adding more system features but they mainly focus on computation features such as threading and SIMD rather than exclusive system features that might break the sandbox. So I don't expect they are going to add low-level access, such as manipulating DNS requests and exposing real filesystem on browsers.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Nov 26 '18 at 23:54

























                answered Nov 25 '18 at 20:10









                Bumsik KimBumsik Kim

                7121916




                7121916






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53404331%2fget-ip-address-of-domain-or-make-dns-request-using-webassembly%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    RAC Tourist Trophy