Skip to content

Get japanese carrier from ip (Based on jpmobile-ipaddresses rails plugin by jpmobile)

Notifications You must be signed in to change notification settings

faeldt/jpmobile-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

jpmobile-ip

Get japanese carrier from ip (Based on jpmobile-ipaddresses rails plugin by jpmobile).

Created for cubie-talk.com, to deal with the situation that Softbank does not allow collections to ports other than 80 from the default Android browser.

Currently supported carriers

Softbank

Installation

npm install jpmobile-ip

Usage

var jpmobile = require('jpmobile-ip');

if (jpmobile.isIpFromCarrier(req.connection.remoteAddress, "softbank")) {
  // Do something..
}

or as Express middleware

app.configure(function() {
  app.use(jpmobile.middleware());
});

app.get("/", function (req, res) {
    console.log(req.carrier);
});

About

Get japanese carrier from ip (Based on jpmobile-ipaddresses rails plugin by jpmobile)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published