Skip to content

Commit

Permalink
v3.5.4: Prettify the README
Browse files Browse the repository at this point in the history
  • Loading branch information
joeymalvinni committed Apr 14, 2021
1 parent d63e581 commit 0185b21
Showing 1 changed file with 33 additions and 90 deletions.
123 changes: 33 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,42 @@
# **webrtc-ip**
💻 Gets a users public IP address in the browser.


### NOTICE:
This script no longer gets users private IP addresses, due to security concerns originating with the teams at Google and Apple, but reliably gets public ones. For more information, please read [this](https://bloggeek.me/psa-mdns-and-local-ice-candidates-are-coming/) great article that explains all you need to know.

<p align="center">
<img src="https://raw.githubusercontent.com/joeymalvinni/webrtc-ip/main/imgs/webrtc-ips-banner.svg"></img>
<br>
</p>
<p align="center">
<a href="https://travis-ci.com/joeymalvinni/random-usernames">
<img alt="Build Status" src="https://travis-ci.com/joeymalvinni/random-usernames.svg?branch=main">
</a>
<a href="https://opensource.org/licenses/Apache-2.0">
<img alt="Apache 2.0 License" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg">
</a>
<a href="https://github.com/joeymalvinni/random-usernames/contributors/">
<img alt="Github contributors" src="https://img.shields.io/github/contributors/joeymalvinni/random-usernames.svg">
</a>
<a href="https://snyk.io/test/github/joeymalvinni/random-usernames/">
<img alt="Snyk vulnerabilities" src="https://snyk.io/test/github/joeymalvinni/random-usernames/badge.svg?targetFile=package.json">
</a>
<a href="https://github.com/joeymalvinni/random-usernames/pulls">
<img alt="PRs welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg">
</a>
</p>

<br>

### Disclaimer
This software is for educational purposes only. This software should not be used for illegal activity. The author is not responsible for its use.


---


## Quick Start

To use `webrtc-ips`, you need to include the `<script` tag in the `<head>` section of your HTML document.

### Getting Started
If you are using this in the browser, include the following script in the `<head>` part of your HTML to access the `getIPs()` function:
```html
<script src="https://cdn.jsdelivr.net/gh/joeymalvinni/webrtc-ip/dist/production.min.js"></script>
<!---- OR use the dev bundle: ----->
<script src="https://cdn.jsdelivr.net/gh/joeymalvinni/webrtc-ip/dist/bundle.dev.js"></script>
```

You now have access to the `getIPs()` function.


### Alternatives

If you don't want to include this as a script, you can run the code on the website like this:
```js
(async() => {
eval(await (await fetch("https://cdn.jsdelivr.net/gh/joeymalvinni/webrtc-ip/dist/bundle.dev.js")).text());
alert(await getIPs());
})()
```
Please note: this does not work on sites like Github where `unsafe-eval` is disabled.

Now you have access to the `getIPs()` function:

---



### Usage

```js
// Using Promises:
getIPs().then(data=>{
Expand All @@ -56,67 +50,16 @@ getIPs().then(data=>{
})();
```

# webrtc-ip

💻 Gets a users public IP address in the browser.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine to test the example server.

### Prerequisites

Clone the github repository (you will need Node.js and NPM installed on your device):

```
$ git clone https://github.com/joeymalvinni/webrtc-ip.git
```


### Installing

Install dependencies:

```
npm install
```

Start up the server:

```
$ npm start
```

The example server should now be running on `http://localhost`.

## Running the tests

If you would like to triple check that this server works, you can test it:

```
npm test
```

## Contributing

Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/joeymalvinni/webrtc-ip/tags).
## Examples

The example (located at [`/example`](https://github.com/joeymalvinni/webrtc-ip/tree/main/example)) is being hosted on [Heroku](https://webrtc-ip.herokuapp.com/).

## Authors

* **Joseph Malvinni** - *Initial work* - [joeymalvinni](https://github.com/joeymalvinni)
The author of webrtc-ips is [Joey Malvinni](https://github.com/joeymalvinni)

See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.
[List of all contributors](https://github.com/joeymalvinni/webrtc-ips/graphs/contributors)

## License

This project is licensed under the Apache 2.0 License - see the [LICENSE.md](LICENSE.md) file for details

## Acknowledgments

* Code inspiration taken from
* Inspiration
* etc
[Apache 2.0](LICENSE)

0 comments on commit 0185b21

Please sign in to comment.