Compare commits
No commits in common. "9eb0527eee581dfb67fab47f1932b3fb4a3ac095" and "806cd6056902935fe61f3fa163d5cfe9ee4a9543" have entirely different histories.
9eb0527eee
...
806cd60569
|
@ -9,7 +9,16 @@ set(CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard to use")
|
|||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS ON)
|
||||
|
||||
add_custom_target(Work ALL DEPENDS configs.hh)
|
||||
#add_library(support STATIC ext/powerblog/h2o-pp.cc
|
||||
# ext/powerblog/ext/simplesocket/swrappers.cc
|
||||
# ext/powerblog/ext/simplesocket/comboaddress.cc
|
||||
# ext/powerblog/ext/simplesocket/sclasses.cc
|
||||
# ext/fmt-7.1.3/src/format.cc)
|
||||
|
||||
|
||||
|
||||
#target_include_directories(support PUBLIC ext/powerblog/ext/simplesocket ext/powerblog/ext ext/fmt-7.1.3/include/)
|
||||
#target_link_libraries(support PUBLIC -lh2o-evloop -lssl -lcrypto Threads::Threads)
|
||||
|
||||
add_executable(teller teller.cc ext/lpm.c)
|
||||
target_link_libraries(teller -lpcaudio -lpthread)
|
||||
|
@ -20,9 +29,6 @@ target_link_libraries(testrunner -lpcaudio)
|
|||
enable_testing()
|
||||
add_test(testname testrunner)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT configs.hh
|
||||
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/make-built-in-config.sh ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS teller.conf trackers.conf
|
||||
)
|
||||
|
||||
enable_testing()
|
||||
add_test(testname testrunner)
|
||||
|
|
20
README.md
20
README.md
|
@ -11,26 +11,6 @@ Demo video [in this tweet](https://twitter.com/bert_hu_bert/status/1561466204602
|
|||
|
||||
[Blog post with more videos](https://berthub.eu/articles/posts/tracker-beeper/)
|
||||
|
||||
## Installing on OSX:
|
||||
If need be, install Homebrew via https://brew.sh/ as this will allow you to
|
||||
compile new software. To do so, copy paste the instruction under 'Install
|
||||
Homebrew' into the terminal app ([Apple
|
||||
help](https://support.apple.com/guide/terminal/open-or-quit-terminal-apd5265185d-f365-44cb-8b09-71a064a42125/mac)). This might take quite a while.
|
||||
It will also ask for your password.
|
||||
|
||||
Then run:
|
||||
```
|
||||
brew tap robertjakub/teller
|
||||
brew install --HEAD googerteller
|
||||
```
|
||||
|
||||
To then start the noise, enter:
|
||||
```
|
||||
sudo tcpdump -nql | teller
|
||||
```
|
||||
And it should work. For the last command, it may also again ask you to enter your
|
||||
password.
|
||||
|
||||
## How to compile
|
||||
This will currently only work on Unix derived systems (like Linux, OSX and
|
||||
FreeBSD).
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
cd $1
|
||||
(
|
||||
echo \#pragma once
|
||||
echo 'constexpr char tellertoml[]=R"('
|
||||
cat teller.conf
|
||||
echo ')";'
|
||||
|
||||
echo 'constexpr char trackerstoml[]=R"('
|
||||
cat trackers.conf
|
||||
echo ')";'
|
||||
) > configs.hh
|
|
@ -7,7 +7,6 @@
|
|||
#include <pcaudiolib/audio.h>
|
||||
#include "ext/toml.hpp"
|
||||
#include "lpmwrapper.hh"
|
||||
#include "configs.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -74,12 +73,12 @@ int main(int argc, char** argv)
|
|||
{
|
||||
trackertbl = toml::parse_file("trackers.conf");
|
||||
conftbl = toml::parse_file("teller.conf");
|
||||
// std::cout << tbl << "\n";
|
||||
}
|
||||
catch (const toml::parse_error& err)
|
||||
{
|
||||
std::cerr << "Could not read configuration files, using built-in defaults" <<endl;
|
||||
trackertbl = toml::parse(trackerstoml);
|
||||
conftbl = toml::parse(tellertoml);
|
||||
std::cerr << "Parsing failed:\n" << err << "\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
map<string, TrackerConf> trackerdb;
|
||||
|
|
Loading…
Reference in New Issue