{"_id":"sni","_rev":"17-6ec8f79a042d1c71a8f51e581142e4c0","name":"sni","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"sni","version":"0.0.0","keywords":["buffer","net","tls","sni","ssl","crypto"],"author":{"name":"Jan Buschtöns","email":"buschtoens@gmail.com"},"license":"MIT","_id":"sni@0.0.0","maintainers":[{"name":"silvinci","email":"buschtoens@gmail.com"}],"contributors":[{"url":"https://github.com/silvinci","name":"Jan Buschtöns","email":"buschtoens@gmail.com"}],"dist":{"shasum":"bfacac53e471a1dd002c3df76ad63dfe4f7d8b1b","tarball":"https://registry.npmjs.org/sni/-/sni-0.0.0.tgz","integrity":"sha512-SkD95DqR0bgFErAhJi0F3PBEAFpdHKTvrnEGHgZehGgC5TsJ/oVPgNTfU1j/AjMbvCWh/9ztX/20fv69TcTDZA==","signatures":[{"sig":"MEUCIQDaJZqKo8DsTjQ5HDeeIf83Py/48XmwBGkCbTKHoQBHKAIgLvww8d/OixjnjyC9hY8T+ykjrIw5McVDGLT8QQHI3G8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","_from":".","engines":{"node":"*"},"_npmUser":{"name":"silvinci","email":"buschtoens@gmail.com"},"repository":{"url":"git://github.com/silvinci/sni","type":"git"},"_npmVersion":"1.2.14","description":"Get the Server Name Indication of a raw TLS stream","directories":{}},"0.0.1":{"name":"sni","version":"0.0.1","keywords":["buffer","net","tls","sni","ssl","crypto"],"author":{"name":"Jan Buschtöns","email":"buschtoens@gmail.com"},"license":"MIT","_id":"sni@0.0.1","maintainers":[{"name":"silvinci","email":"buschtoens@gmail.com"}],"contributors":[{"url":"https://github.com/silvinci","name":"Jan Buschtöns","email":"buschtoens@gmail.com"}],"dist":{"shasum":"b165a8a483e7d4fea1d9e1a8849444a41f1fb015","tarball":"https://registry.npmjs.org/sni/-/sni-0.0.1.tgz","integrity":"sha512-yOhD6GnP9q6o/UX95SyGs8BLO+aS39NFhxAgewr6QEex3cb8sucvq8urpjyPxnsM5l+RLFuWqCG+QX1c11XYjg==","signatures":[{"sig":"MEUCIQCQQmngdqR3nI6TAJeNKK7Do3+caCzsXfBuAlCoyvY02AIgcrjnTCPCcBwtQbsvrhlj0cp/rhOtTVOTymUDbA3iaEc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","_from":".","engines":{"node":"*"},"_npmUser":{"name":"silvinci","email":"buschtoens@gmail.com"},"repository":{"url":"git://github.com/silvinci/sni","type":"git"},"_npmVersion":"1.2.14","description":"Get the Server Name Indication of a raw TLS stream","directories":{}},"1.0.0":{"name":"sni","version":"1.0.0","keywords":["buffer","net","tls","sni","ssl","crypto"],"author":{"name":"Jan Buschtöns","email":"buschtoens@gmail.com"},"license":"MIT","_id":"sni@1.0.0","maintainers":[{"name":"buschtoens","email":"buschtoens@gmail.com"},{"name":"jessetane","email":"jesse.tane@gmail.com"},{"name":"jornane","email":"npm@jornane.no"}],"contributors":[{"url":"https://github.com/silvinci","name":"Jan Buschtöns","email":"buschtoens@gmail.com"}],"homepage":"https://github.com/silvinci/sni#readme","bugs":{"url":"https://github.com/silvinci/sni/issues"},"dist":{"shasum":"6fa42bdf9776de2e37cec60122e6bec83df006f5","tarball":"https://registry.npmjs.org/sni/-/sni-1.0.0.tgz","integrity":"sha512-YMN2SdbrNjA4OWzpMUe7sZzUvvfEKl2JToyBLfFJMK+EpkU4bJEAkePqYE3YjZtgdLCoUaK0Lo84MjM8UqF38w==","signatures":[{"sig":"MEUCIQDyNLhFLEdbqU3QRvDLzyB5ZAZLRdInO1ujMqVGKPPn5gIgTeJJWWR9cNT1GYFO5IfypE7COUtm6Gjw51L1FHvmbfE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","_from":".","_shasum":"6fa42bdf9776de2e37cec60122e6bec83df006f5","engines":{"node":"*"},"gitHead":"a52ade27f6d4a96651ddc2e1930ce7345ddc3a32","scripts":{"test":"node test","bench":"node bench"},"_npmUser":{"name":"jessetane","email":"jesse.tane@gmail.com"},"repository":{"url":"git://github.com/silvinci/sni.git","type":"git"},"_npmVersion":"3.8.6","description":"Get the Server Name Indication of a raw TLS stream","_nodeVersion":"5.11.1","devDependencies":{"tape":"^4.5.1"},"_npmOperationalInternal":{"tmp":"tmp/sni-1.0.0.tgz_1465944145480_0.8915938714053482","host":"packages-12-west.internal.npmjs.com"},"directories":{}}},"time":{"created":"2013-07-24T12:36:02.957Z","modified":"2026-09-15T14:47:03.961Z","0.0.0":"2013-07-24T12:36:07.391Z","0.0.1":"2013-07-24T14:19:17.149Z","1.0.0":"2016-06-14T22:42:27.897Z"},"bugs":{"url":"https://github.com/silvinci/sni/issues"},"author":{"name":"Jan Buschtöns","email":"buschtoens@gmail.com"},"license":"MIT","homepage":"https://github.com/silvinci/sni#readme","keywords":["buffer","net","tls","sni","ssl","crypto"],"repository":{"url":"git://github.com/silvinci/sni.git","type":"git"},"description":"Get the Server Name Indication of a raw TLS stream","contributors":[{"url":"https://github.com/silvinci","name":"Jan Buschtöns","email":"buschtoens@gmail.com"}],"maintainers":[{"name":"buschtoens","email":"buschtoens@gmail.com"},{"name":"jessetane","email":"jesse.tane@gmail.com"},{"name":"jornane","email":"npm@jornane.no"}],"readme":"# sni\n\nGet the Server Name Indication of a raw TLS stream (without Node's TLS module)\n\n## Installation\n```\nnpm install sni\n```\n\n## Usage\n```js\nvar sni = require(\"sni\")\n  , net = require(\"net\");\n\nnet.createServer(function(socket) {\n    socket.once(\"data\", function(data) { // Listen on the HELLO packet\n        console.log(sni(data)); // www.example.com or null if no servername was found\n    });\n}).listen(443); // Listen on the HTTPS port\n```\n\n## Benchmark\n1,000,000 rounds took me 157 ms.\nTest it for yourself with `npm run bench`.\n\n## Why?\nBecause I wanted to route my HTTPS streams without actually encoding them with\nNode's TLS module.\n\n## Note\nIt is recommended that you attempt to determine if your data actually _is_ a TLS client hello before attempting to extract the SNI. A library to do just such a thing can be found [here](https://github.com/jessetane/is-tls-client-hello).\n\n## License\nMIT","readmeFilename":"README.md","users":{"fgribreau":true,"roshanravi10":true}}