Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

Add baseurl as parameter to BwScan so that other URLs can be used. #79

Closed
wants to merge 2 commits into from

Conversation

juga0
Copy link
Collaborator

@juga0 juga0 commented Feb 3, 2018

No description provided.

@coveralls
Copy link

coveralls commented Feb 3, 2018

Coverage Status

Coverage remained the same at ?% when pulling 6b2f2d3 on juga0:feature/var_url into 839fc5a on TheTorProject:develop.

@teor2345
Copy link
Collaborator

teor2345 commented Feb 3, 2018 via email

@juga0
Copy link
Collaborator Author

juga0 commented Feb 4, 2018

@teor2345 it would probably be easier to specify the files in a configuration file rather than passing them by command line. See this other PR as an example of what i mean 553d5bb#diff-13462b18037a179e7f8b7eafaf14bfb3R9
What do you think?.

@teor2345
Copy link
Collaborator

teor2345 commented Feb 4, 2018 via email

@juga0
Copy link
Collaborator Author

juga0 commented Feb 5, 2018

I don't think it is possible to change the server without changing the hashes.

Also, the default bandwidth server that is currently in the code is a poor choice.
Using for testing changes the performance of one of the public bandwidth authorities.
https://trac.torproject.org/projects/tor/ticket/24090
Can you please remove it?

This PR would allow to specify a different server by command line, but not files, as it would require to provide also the hash, which seems lot of data to provide by command line.
Or do you think we should also have the option to provide the files (size and hash) by command line?.

PR #76 would allow to specify a different server in a config file and also the files in the same config file.

When any of these PRs has been merged, we can use other server (and files).

Do you mean i should completely remove the server even as a default/example?. Do we have another we can use in the meanwhile at least for testing?.

We will probably replace it with a CDN or a dedicated test server:
https://trac.torproject.org/projects/tor/ticket/21990

When a CDN or dedicated test server could be ready?.

@ln5
Copy link

ln5 commented Feb 5, 2018

When a CDN or dedicated test server could be ready?.

I can provide a dedicated server to pull from if that helps.
It's a physical (old) machine on a Sunet network, currently unused.
LMK if that'd help with testing at least.

@teor2345
Copy link
Collaborator

teor2345 commented Feb 5, 2018 via email

@teor2345
Copy link
Collaborator

teor2345 commented Feb 5, 2018 via email

@ln5
Copy link

ln5 commented Feb 5, 2018

Thanks, Linus, a test server would be helpful

I've revived siv.sunet.se. The URL is http://siv.sunet.se/bwauth/FILE where FILE is any of

128k 16M 16k 1M 256k 2M 32M 32k 4M 512k 64M 64k 8M

It has an old x509 cert sitting around. LMK if I should turn that into a more useful cert.

@juga0
Copy link
Collaborator Author

juga0 commented Feb 6, 2018

It has an old x509 cert sitting around. LMK if I should turn that into a more useful cert.

It would be great if you can create a valid certificate (maybe use let's encrypt?), otherwise bwscanner will fail with certificate verify failed

@ln5
Copy link

ln5 commented Feb 6, 2018

It would be great if you can create a valid certificate (maybe use let's encrypt?), otherwise bwscanner will fail with certificate verify failed

Done.

@juga0
Copy link
Collaborator Author

juga0 commented Feb 6, 2018

@ln5 awesome, thanks!.
It probably makes sense to provide files until 64M as it was provided in the other server (https://github.com/TheTorProject/bwscanner/blob/develop/bwscanner/measurement.py#L48).
Maybe you could also provide the file hashes?.

@ln5
Copy link

ln5 commented Feb 6, 2018

SHA1 (128k) = daddcbd4499c646f0c4d869934944edb6b341b11
SHA1 (16M) = 2c2dd00a8850488b2b9d6e1c2bbc8acdb758ce45
SHA1 (16k) = a0d7b476328f895f8e0bc2e4efaf09957aba99d1
SHA1 (1M) = 8781a35b06e7052182f9c989936c888d8e956127
SHA1 (256k) = 3112c27df31fb9c423320c8b072382e47a014aa2
SHA1 (2M) = 9d12d12690ea0ef65222a8048fdca80837b35d5c
SHA1 (32M) = ad851b064681990ecf429c6499d46c6300bf39d0
SHA1 (32k) = 21de01ab7660fb6b70afa355955633592a7b3e1e
SHA1 (4M) = 4ec4f097e6955560118686bdad4043766fbffa3c
SHA1 (512k) = a3244b696b320dd35deab1b0f479a9ad0c7eff03
SHA1 (64M) = 8dda0231315e7d77d2f7739d02c0a96d6bba7694
SHA1 (64k) = 1b102723d6d6df67694e92ea8a4c22288bec6e46
SHA1 (8M) = cb111402b64f7cdf465fc5cc71c1525415beb5da

@juga0
Copy link
Collaborator Author

juga0 commented Feb 6, 2018

Great, thanks!

@teor2345
Copy link
Collaborator

teor2345 commented Feb 6, 2018 via email

@ln5
Copy link

ln5 commented Feb 6, 2018

SHA256 (128k) = 072b052df2fba25a9578b69d49986024747ad9e43472db345a03ca6e22027ba6
SHA256 (16M) = 6258de4f4d602be75a3458117b29d2c580c4bcb7ba5b9d2c4135c7603109f554
SHA256 (16k) = 924bddcc93f8f76effd495c47b0d39451e34d8204029fe2b7f85905522255e7b
SHA256 (1M) = daf6da82bc4a20567dcd5eb7e583f3137800c31eb31f5fed79f27a4278903780
SHA256 (256k) = f3655613066fd0db916b0b00bde1a3905516584ea2c4ee4cac3a8ffb08f2f31c
SHA256 (2M) = 3e39b0bb92912cf1ad6c01fb7c9d592e814a691c61de1f649416f6bba2d15082
SHA256 (32M) = 5a5d66d7865f09498d776f20c9e9791b055a4fff357185f84fb4ecfca7da93f0
SHA256 (32k) = 2ec95ff2c8beca72996161e2bd7831008baf2e012d12b6c84d51e9264fc50fdc
SHA256 (4M) = 4daaa42377d3c87577797d44a8fa569038e7a9d6a5d417a09d8ba41a69456164
SHA256 (512k) = 20e1e9b44c3cb445a59138df8a03767356637ec751beee1f9233ca881121adc6
SHA256 (64M) = f8059f096b4d123355255f12f72610177a64047e9ced2f4e3bff52646fca38a8
SHA256 (64k) = 73bee20c527362b18d4adb7e638a6513504954367379e7c61f7f45bdc71c5ddb
SHA256 (8M) = 738c5604295b9377f7636ce0c2c116f093bb50372f589a6c2332a3bb6bba096a

@juga0
Copy link
Collaborator Author

juga0 commented Feb 6, 2018

@teor2345

  • configure bandwidth server addresses and allow disabling hash checking on the command line

i changed the default baseurl and file hashes to match the ones of @ln5.
In a new commit (still this PR) i added an option to provide files without hash.
However now travis is failing, need to solve that...

  • configure multiple server/file/hash sets in a config file

Changed default baseurl and file hashes in the default config in #76.
To have several servers requires more changes in the code, maybe we could add a new issue for it.

@aagbsn
Copy link
Collaborator

aagbsn commented Mar 19, 2018

I didn't finish this branch, but might be worth looking at too:
a294124

Copy link
Member

@meejah meejah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, 👍 (one inline comment)

@@ -76,7 +69,7 @@ def choose_file_size(self, path):
return max(self.bw_files.keys())

def choose_url(self, path):
return self.baseurl + '/' + self.bw_files[self.choose_file_size(path)][0]
return self.baseurl + self.bw_files[self.choose_file_size(path)][0]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is dropping the / intensional? Or perhaps should check that baseurl has a trailing slash in __init__.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is intentional. Yes, it seems a good solution to me to check the trailing slash in __init__.
IMO, it would be even better to move URLs and files to a config file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is done in https://github.com/TheTorProject/bwscanner/pull/76/files#diff-13462b18037a179e7f8b7eafaf14bfb3, though it needs to be updated with the new urls and files

@juga0
Copy link
Collaborator Author

juga0 commented Mar 24, 2018

This PR is now fixed in a different way by #105.
Re. @teor2345 suggestions in #79 (comment), there's already #57 and created #106.

@juga0 juga0 closed this Mar 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants