Coder Social home page Coder Social logo

feral's People

Contributors

frankthetank7254 avatar kermithenson avatar naisspas avatar randomessence avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

feral's Issues

IPV4 -4

You should add -4 to Curl when posting to feral web site. It apparently checks for ipv6.

add additional requirement checks

Working on getting this to run automatically on my router using Entware (a project in and of itself it seems). It looks like 'sed' was added as a requirement to the script at some point. I'd recommend adding a check to ensure that sed is installed in the future.

stuck on "Waiting for route change to take effect"

I am running hits on my router using entware. It looks like the script is getting stuck on line 115.

    while [ $route_set = 1 ]; do
    route_set=$(curl -4 -s "https://network.feral.io/looking-glass?action=traceroute&host=$ext_IP" | grep -c "$old_route")
    done

I manually added some echos for those variables, and it looks like route_set is not getting set properly. I then ran the curl and grep commands manually with the variables filled in properly. It looks like grep returns the expected 0 value (so the script can move on), BUT, curl then outputs additional text, clobbering the results. Essentially it looks like this:

admin@router:/tmp/home/root# curl -4 -s https://network.feral.io/looking-glass?action=traceroute&host=99.99.99.99 | grep -c "77.67.64.81"
0
admin@router:/tmp/home/root# <!DOCTYPE html>
<html lang="en-GB">
    <head>
        <title>Looking Glass - network.feral.io</title>
        <link rel="stylesheet" type="text/css" media="all" href="/css/reset.css">
        <link rel="stylesheet" type="text/css" media="all" href="/css/network.feral.io.css">

    </head>

I did some Googling and was trying to see if someone else had run into curl being strange. In some futile attempts to fix this, I was able to workaround it by adding a syntax error to curl. Curl continued to run as expected, but reported a warning message.. That was apparently enough for it to continue on in the rest of the script though.

In auto-reroute.sh, add -w (--max-time) option to curl when downloading test files.

Sometimes the script can take an hour to complete because the network is painfully slow and the test files are over 200MB.

Adding a --max-time option to the curl command on line 28 would greatly decrease the chances of the script hanging.

According to the curl manual:

-m, --max-time <seconds>
Maximum time in seconds that you allow the whole operation to take. This is useful for preventing your batch jobs from hanging for hours due to slow networks or links going down.

Currently, the line in the script is:

messyspeed=$(echo -n "scale=2; " && curl -4 -s -L ${test_files[$count]} -w "%{speed_download}" -o /dev/null | sed "s/\,/\./g")

The changed line would read like this:

messyspeed=$(echo -n "scale=2; " && curl -4 -s -m 180 -L ${test_files[$count]} -w "%{speed_download}" -o /dev/null | sed "s/\,/\./g")

The option -m 180 specifies a timeout of 180 seconds, or 3 minutes.

Add option to skip measuring default route

The default route is ALWAYS soooo slow for me. The test takes several minutes to run as opposed to seconds like the other tests. I know that I never, ever want to use the terrible default route. Can you add an option to the script to skip testing the default route? Thanks!

auto-reroute is out of date

The routes are not up-to-date! So this no longer works. Output looks like this:

You are currently using the default route
Testing single segment download speed from Default...
[32mrouting through Default results in 51.76 Mbit/s[0m

Testing single segment download speed from Cogent...
[32mrouting through Cogent results in 0 Mbit/s[0m

Testing single segment download speed from Console#1...
[32mrouting through Console#1 results in 0 Mbit/s[0m

Testing single segment download speed from Console#2...
[32mrouting through Console#2 results in 0 Mbit/s[0m

Testing single segment download speed from GTT...
[32mrouting through GTT results in 0 Mbit/s[0m

Testing single segment download speed from NTT#1...
[32mrouting through NTT#1 results in 0 Mbit/s[0m

Testing single segment download speed from NTT#2...
[32mrouting through NTT#2 results in 0 Mbit/s[0m

Testing single segment download speed from Level3...
[32mrouting through Level3 results in 0 Mbit/s[0m

Testing single segment download speed from Telia...
[32mrouting through Telia results in 0 Mbit/s[0m

Routing through Default provided the highest speed of 51.76 Mbit/s
No need to change routes, as the Default was chosen at the beginning of this test.
All done!

I am writing a Python version of this script that automagically grabs the relevant routes but I am not sure where you're finding the test_files. Would be glad to share my script when written, or to swap out your script (which is still run daily on my network) with updated values.

reroute_check Hangs.

Over the past few days, where i have a cronjob running the script every hour, i noticed 2-5 hours gabs in the logfile, where there script is not completed.

A temp fix, is to comment out the reroute_check at the end of the file, as the route is set anyway (confirmed at https://network.feral.io/reroute)

#echo "Waiting for route change to take effect..."
#eroute_check

All times in log file is Feral+2

auto-reroute-log.txt

Add option to limit test file download time

If a route or the connection in use is especially slow, it may cause the whole route selection process to take a very long time.

I'd suggest adding the --max-time option to the curl download of the test file and setting it to a reasonable value (e.g. 30 seconds).

All routes immediately report 0Mbit/s and nothing changes

This is a new behavior that I noticed recently when I observed that my downloads are all slow again. I run auto-reroute.sh in a cron job, so I don't know how long this has been happening. Here's the output I get. The script hangs indefinitely at the end (as does the page https://network.feral.io/reroute when I try to update the route by picking a route and submitting the form) so I hit Ctrl-C to kill it.

mike:~% time ./auto-reroute
You are currently using the default route
Testing single segment download speed from Default...
routing through Default results in 0 Mbit/s

Testing single segment download speed from Fiber-Ring#1...
routing through Fiber-Ring#1 results in 0 Mbit/s

Testing single segment download speed from Fiber-Ring#2...
routing through Fiber-Ring#2 results in 0 Mbit/s

Testing single segment download speed from GTT...
routing through GTT results in 0 Mbit/s

Testing single segment download speed from Level3...
routing through Level3 results in 0 Mbit/s

Testing single segment download speed from NTT#1...
routing through NTT#1 results in 0 Mbit/s

Testing single segment download speed from NTT#2...
routing through NTT#2 results in 0 Mbit/s

Routing through Fiber-Ring#2 provided the highest speed of 0 Mbit/s
Setting route to Fiber-Ring#2 / 87.255.32.249 ...
^C
./auto-reroute  0.76s user 0.36s system 9% cpu 11.851 total

OS:

mike:~% uname -a
Linux mike 3.19.0-15-generic #15-Ubuntu SMP Thu Apr 16 23:32:01 UTC 2015 i686 i686 i686 GNU/Linux
mike:~% lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:        15.04
Codename:       vivid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.