{"action":"created","issue":{"url":"https://api.github.com/repos/turbobytes/geoipdb/issues/8","repository_url":"https://api.github.com/repos/turbobytes/geoipdb","labels_url":"https://api.github.com/repos/turbobytes/geoipdb/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/turbobytes/geoipdb/issues/8/comments","events_url":"https://api.github.com/repos/turbobytes/geoipdb/issues/8/events","html_url":"https://github.com/turbobytes/geoipdb/issues/8","id":190066931,"number":8,"title":"Detect if input string is RFC1918","user":{"login":"sajal","id":25007,"avatar_url":"https://avatars.githubusercontent.com/u/25007?v=3","gravatar_id":"","url":"https://api.github.com/users/sajal","html_url":"https://github.com/sajal","followers_url":"https://api.github.com/users/sajal/followers","following_url":"https://api.github.com/users/sajal/following{/other_user}","gists_url":"https://api.github.com/users/sajal/gists{/gist_id}","starred_url":"https://api.github.com/users/sajal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sajal/subscriptions","organizations_url":"https://api.github.com/users/sajal/orgs","repos_url":"https://api.github.com/users/sajal/repos","events_url":"https://api.github.com/users/sajal/events{/privacy}","received_events_url":"https://api.github.com/users/sajal/received_events","type":"User","site_admin":false},"labels":[{"id":481241090,"url":"https://api.github.com/repos/turbobytes/geoipdb/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":481241093,"url":"https://api.github.com/repos/turbobytes/geoipdb/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-17T14:46:37Z","updated_at":"2016-12-08T12:23:28Z","closed_at":null,"body":"If the input string is private network, then return some sort of answer(TBD) indicating so.\r\n\r\nhttps://en.wikipedia.org/wiki/Private_network\r\nInclude private and link-local ips for both v4 and v6\r\n\r\nPerhaps export and reuse `islocalip` from https://github.com/turbobytes/pulse/blob/e60f6c0a7bcab4575000e39050bea20ecae8064f/utils/misc.go#L15"},"comment":{"url":"https://api.github.com/repos/turbobytes/geoipdb/issues/comments/265728019","html_url":"https://github.com/turbobytes/geoipdb/issues/8#issuecomment-265728019","issue_url":"https://api.github.com/repos/turbobytes/geoipdb/issues/8","id":265728019,"user":{"login":"sajal","id":25007,"avatar_url":"https://avatars.githubusercontent.com/u/25007?v=3","gravatar_id":"","url":"https://api.github.com/users/sajal","html_url":"https://github.com/sajal","followers_url":"https://api.github.com/users/sajal/followers","following_url":"https://api.github.com/users/sajal/following{/other_user}","gists_url":"https://api.github.com/users/sajal/gists{/gist_id}","starred_url":"https://api.github.com/users/sajal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sajal/subscriptions","organizations_url":"https://api.github.com/users/sajal/orgs","repos_url":"https://api.github.com/users/sajal/repos","events_url":"https://api.github.com/users/sajal/events{/privacy}","received_events_url":"https://api.github.com/users/sajal/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T12:23:28Z","updated_at":"2016-12-08T12:23:28Z","body":"An example of the issue can be seen at https://pulse.turbobytes.com/results/584916d3ecbe407b4f000005/\r\n\r\nSee result for `104-HEDII`. It incorrectly identifies `80.10.246.2` and `80.10.246.129` as `Local Network` .\r\n\r\nAnother example: https://pulse.turbobytes.com/results/58494e98ecbe407b4f0001a5/\r\nIt tries to lookup asn for ns[1-2].google.com.\r\n\r\nI propose following \"pre-flight\" checks :-\r\n\r\n1. Detect if the input is a valid IP or not, by using [net.ParseIP](https://golang.org/pkg/net/#ParseIP). If not then return appropriate error.\r\n2. Check the IP against `islocalip()`, if so then return an error type, which caller can use to determine local network.\r\n3. Check if the IP is v4 or v6. if v6 then return some sort of \"not implemented\" error until #9 is implemented.\r\n\r\nIdeally, I would like the logic of `islocalip()` to live in one place.\r\nNote: `github.com/turbobytes/utils` cannot have geoipdb as dependency because of cgo requirement."}}
{"actor":{"display_login":"sajal"}}