I like to develop (obviously, this is GitHub) and reverse engineer software.
My favorite programming language is Rust.
A lightweight UDP torrent tracker
Home Page: https://naim94a.github.io/udpt
License: MIT License
I like to develop (obviously, this is GitHub) and reverse engineer software.
My favorite programming language is Rust.
Hi Naim :-)
Thank you for this projet, I like the idea !
Do you think it would be possible to create a new release ? Last version is a bit old.
/tmp/udpt# make
g++ -g -std=gnu++11 -c -o main.o src/main.cpp
src/main.cpp: In function ‘int main(int, char*_)’:
src/main.cpp:203:81: error: no matching function for call to ‘transform(std::__cxx11::basic_string::iterator, std::__cxx11::basic_string::iterator, std::__cxx11::basic_string::iterator, )’
std::transform(severity.begin(), severity.end(), severity.begin(), std::tolower);
^
In file included from /usr/include/c++/5/algorithm:62:0,
from src/main.cpp:26:
/usr/include/c++/5/bits/stl_algo.h:4164:5: note: candidate: template<class _IIter, class _OIter, class _UnaryOperation> _OIter std::transform(_IIter, _IIter, _OIter, _UnaryOperation)
transform(_InputIterator __first, _InputIterator __last,
^
/usr/include/c++/5/bits/stl_algo.h:4164:5: note: template argument deduction/substitution failed:
src/main.cpp:203:81: note: couldn't deduce template parameter ‘_UnaryOperation’
std::transform(severity.begin(), severity.end(), severity.begin(), std::tolower);
^
In file included from /usr/include/c++/5/algorithm:62:0,
from src/main.cpp:26:
/usr/include/c++/5/bits/stl_algo.h:4201:5: note: candidate: template<class _IIter1, class _IIter2, class _OIter, class _BinaryOperation> _OIter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation)
transform(_InputIterator1 __first1, InputIterator1 __last1,
^
/usr/include/c++/5/bits/stl_algo.h:4201:5: note: template argument deduction/substitution failed:
src/main.cpp:203:81: note: candidate expects 5 arguments, 4 provided
std::transform(severity.begin(), severity.end(), severity.begin(), std::tolower);
^
Makefile:27: recipe for target 'main.o' failed
make: ** [main.o] Error 1
Trying on Debian Unstable/Sid x86_64
Hello, I'm eager to get this working, but it seems that I can't get my clients to connect to the tracker.
I tried binding my UDP address to 0.0.0.0, 192.168.0.215. and my WAN IP but it's not working.
It looks like I need to enable "allow_iana_ips" in the configuration, but the Wiki here on GitHub.com is not in line with the documentation on GitHub.io.
What does it take to allow this tracker to work with both LAN and WAN clients?
cmake .
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
GTEST
linked by target "udpt_tests" in directory /home/user/udpt
-- Configuring incomplete, errors occurred!
See also "/home/user/udpt/CMakeFiles/CMakeOutput.log".
cat /home/user/udpt/CMakeFiles/CMakeOutput.log
Run Build Command:"/usr/bin/make" "cmTC_f669e/fast"
/usr/bin/make -f CMakeFiles/cmTC_f669e.dir/build.make CMakeFiles/cmTC_f669e.dir/build
make[1]: Entering directory '/home/user/udpt/CMakeFiles/CMakeTmp'
Building CXX object CMakeFiles/cmTC_f669e.dir/feature_tests.cxx.o
/usr/bin/c++ -std=c++98 -o CMakeFiles/cmTC_f669e.dir/feature_tests.cxx.o -c /home/user/udpt/CMakeFiles/feature_tests.cxx
Linking CXX executable cmTC_f669e
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f669e.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/cmTC_f669e.dir/feature_tests.cxx.o -o cmTC_f669e -rdynamic
make[1]: Leaving directory '/home/user/udpt/CMakeFiles/CMakeTmp'
Feature record: CXX_FEATURE:0cxx_aggregate_default_initializers
Feature record: CXX_FEATURE:0cxx_alias_templates
Feature record: CXX_FEATURE:0cxx_alignas
Feature record: CXX_FEATURE:0cxx_alignof
Feature record: CXX_FEATURE:0cxx_attributes
Feature record: CXX_FEATURE:0cxx_attribute_deprecated
Feature record: CXX_FEATURE:0cxx_auto_type
Feature record: CXX_FEATURE:0cxx_binary_literals
Feature record: CXX_FEATURE:0cxx_constexpr
Feature record: CXX_FEATURE:0cxx_contextual_conversions
Feature record: CXX_FEATURE:0cxx_decltype
Feature record: CXX_FEATURE:0cxx_decltype_auto
Feature record: CXX_FEATURE:0cxx_decltype_incomplete_return_types
Feature record: CXX_FEATURE:0cxx_default_function_template_args
Feature record: CXX_FEATURE:0cxx_defaulted_functions
Feature record: CXX_FEATURE:0cxx_defaulted_move_initializers
Feature record: CXX_FEATURE:0cxx_delegating_constructors
Feature record: CXX_FEATURE:0cxx_deleted_functions
Feature record: CXX_FEATURE:0cxx_digit_separators
Feature record: CXX_FEATURE:0cxx_enum_forward_declarations
Feature record: CXX_FEATURE:0cxx_explicit_conversions
Feature record: CXX_FEATURE:0cxx_extended_friend_declarations
Feature record: CXX_FEATURE:0cxx_extern_templates
Feature record: CXX_FEATURE:0cxx_final
Feature record: CXX_FEATURE:0cxx_func_identifier
Feature record: CXX_FEATURE:0cxx_generalized_initializers
Feature record: CXX_FEATURE:0cxx_generic_lambdas
Feature record: CXX_FEATURE:0cxx_inheriting_constructors
Feature record: CXX_FEATURE:0cxx_inline_namespaces
Feature record: CXX_FEATURE:0cxx_lambdas
Feature record: CXX_FEATURE:0cxx_lambda_init_captures
Feature record: CXX_FEATURE:0cxx_local_type_template_args
Feature record: CXX_FEATURE:0cxx_long_long_type
Feature record: CXX_FEATURE:0cxx_noexcept
Feature record: CXX_FEATURE:0cxx_nonstatic_member_init
Feature record: CXX_FEATURE:0cxx_nullptr
Feature record: CXX_FEATURE:0cxx_override
Feature record: CXX_FEATURE:0cxx_range_for
Feature record: CXX_FEATURE:0cxx_raw_string_literals
Feature record: CXX_FEATURE:0cxx_reference_qualified_functions
Feature record: CXX_FEATURE:0cxx_relaxed_constexpr
Feature record: CXX_FEATURE:0cxx_return_type_deduction
Feature record: CXX_FEATURE:0cxx_right_angle_brackets
Feature record: CXX_FEATURE:0cxx_rvalue_references
Feature record: CXX_FEATURE:0cxx_sizeof_member
Feature record: CXX_FEATURE:0cxx_static_assert
Feature record: CXX_FEATURE:0cxx_strong_enums
Feature record: CXX_FEATURE:1cxx_template_template_parameters
Feature record: CXX_FEATURE:0cxx_thread_local
Feature record: CXX_FEATURE:0cxx_trailing_return_types
Feature record: CXX_FEATURE:0cxx_unicode_literals
Feature record: CXX_FEATURE:0cxx_uniform_initialization
Feature record: CXX_FEATURE:0cxx_unrestricted_unions
Feature record: CXX_FEATURE:0cxx_user_literals
Feature record: CXX_FEATURE:0cxx_variable_templates
Feature record: CXX_FEATURE:0cxx_variadic_macros
Feature record: CXX_FEATURE:0cxx_variadic_templates
Following on from issue 43, I'm now receiving the following problem.
The API call returns Okay:
curl -X POST "http://127.0.0.1:1338/api/torrents?action=add&info_hash=**********************************"
{"result": "Okay"}
..and I can see a new table starting 't' followed by a hash value (not the same as the info_hash provided) and a new row in 'torrents' with a blob containing the same value as the newly created 't' table, however uTorrent returns 'info_hash not registered.'.
root@ns1:/tmp/udpt# make all
g++ -c -o main.o src/main.cpp
g++ -c -o udpTracker.o src/udpTracker.cpp
g++ -c -o database.o src/db/database.cpp
g++ -c -o driver_sqlite.o src/db/driver_sqlite.cpp
g++ -c -o settings.o src/settings.cpp
cc -c -o tools.o src/tools.c
g++ -c -o httpserver.o src/http/httpserver.cpp
g++ -c -o webapp.o src/http/webapp.cpp
g++ -c -o logging.o src/logging.cpp
Linking...
g++ -O3 -o udpt main.o udpTracker.o database.o driver_sqlite.o settings.o tools.o httpserver.o webapp.o logging.o -lsqlite3
/usr/bin/ld: udpTracker.o: undefined reference to symbol 'pthread_cancel@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:36: recipe for target 'udpt' failed
make: *** [udpt] Error 1
Linux 2.6.32-042stab127.2 #1 SMP Thu Jan 4 16:41:44 MSK 2018 x86_64 GNU/Linux, DEBIAN FLAVOUR, is no buildie...
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: GTEST linked by target "udpt_tests" in directory /home/malexa/src/udpt LIBEVENT linked by target "udpt" in directory /home/malexa/src/udpt linked by target "udpt_tests" in directory /home/malexa/src/udpt LIBEVENTP linked by target "udpt" in directory /home/malexa/src/udpt linked by target "udpt_tests" in directory /home/malexa/src/udpt SQLITE linked by target "udpt" in directory /home/malexa/src/udpt linked by target "udpt_tests" in directory /home/malexa/src/udpt
I have checked my dependencies already bruh...
in the function UDPTracker::sendError there is an error.
for (i = 8;i <= msg_sz;i++)
{
buff[i] = msg[i - 8];
}
it might cause string subscript out of range.
Original issue reported on code.google.com by [email protected]
on 11 Jul 2013 at 7:18
With the latest GCC udpt cannot be built anymore. The build crashes with:
g++ -g -std=gnu++11 -c -o main.o src/main.cpp -DBOOST_LOG_DYN_LINK
src/main.cpp: In function 'void daemonize(const boost::program_options::variables_map&)':
src/main.cpp:65:57: warning: ignoring return value of 'int chdir(const char*)', declared with attribute warn_unused_result [-Wunused-result]
::chdir(conf["daemon.chdir"].as<std::string>().c_str());
^
g++ -g -std=gnu++11 -c -o udpTracker.o src/udpTracker.cpp -DBOOST_LOG_DYN_LINK
In file included from /nix/store/8sl4jfs3nq0pkq4gg655s3axrxdx7z29-glibc-2.24-dev/include/bits/byteswap.h:35:0,
from /nix/store/8sl4jfs3nq0pkq4gg655s3axrxdx7z29-glibc-2.24-dev/include/endian.h:60,
from /nix/store/8sl4jfs3nq0pkq4gg655s3axrxdx7z29-glibc-2.24-dev/include/sys/types.h:216,
from /nix/store/8sl4jfs3nq0pkq4gg655s3axrxdx7z29-glibc-2.24-dev/include/stdlib.h:275,
from /nix/store/hxj3mhv9cwnapzay50dwin8p05s0k89a-gcc-5.4.0/include/c++/5.4.0/cstdlib:72,
from /nix/store/hxj3mhv9cwnapzay50dwin8p05s0k89a-gcc-5.4.0/include/c++/5.4.0/bits/stl_algo.h:59,
from /nix/store/hxj3mhv9cwnapzay50dwin8p05s0k89a-gcc-5.4.0/include/c++/5.4.0/algorithm:62,
from src/udpTracker.hpp:26,
from src/udpTracker.cpp:20:
src/udpTracker.cpp: In member function 'void UDPT::UDPTracker::start()':
src/udpTracker.cpp:105:191: error: expected id-expression before '(' token
BOOST_LOG_SEV(m_logger, boost::log::trivial::info) << "UDP tracker bound on " << ::inet_ntop(AF_INET, reinterpret_cast<LPVOID>(&m_localEndpoint.sin_addr), buff, sizeof(buff)) << ":" << ::htons(m_localEndpoint.sin_port);
^
make: *** [Makefile:28: udpTracker.o] Error 1
It may be related to issues described in:
The issue occured when i tried to package udpt for nixOS - a declarative Linux-based Operating System.
This is the downstream PR NixOS/nixpkgs#19171
What steps will reproduce the problem?
1. Make a configure file and add the ability to read it
2. create default settings in case the configuration is corrupted or not
available.
What is the expected output? What do you see instead?
The port will be configurable, and the person running the server would be able
to choose a port other than 6969.
Original issue reported on code.google.com by [email protected]
on 3 Dec 2012 at 11:10
Use the following library to process command options: http://www.boost.org/doc/libs/1_60_0/doc/html/program_options.html.
This library is cross platform compatible and make code more readable.
I am having trouble with the build on the latest version. When I try to execute cargo build --release it complains at me on Debian 10.
cargo build --release
error: failed to parse lock file at: /root/udpt/Cargo.lock
Caused by:
invalid serialized PackageId for key `package.dependencies`
Hi,
I face the following issue when trying to start udpt (-i -c ):
terminate called after throwing an instance of 'boost::exception_detail::clone_implboost::exception_detail::error_info_injectorboost::bad_any_cast'
what(): boost::bad_any_cast: failed conversion using boost::any_cast
Aborted
The config file seems ok:
./udpt -t -c tracker.conf
Config OK
What should I look for to fix?
TIA for any answer!
lem
I'm almost done on adding Docker workflow to udpt hacking alternatives.
To allow any udpt port to be contacted outside a Docker container, it should be able to listen to 0.0.0.0. The exposed iface and ports are meant to be configured outside the container with standard port mappings. API server port can be configured, but I could not find a way to change the listen iface, neither inside udpt.conf or via the command line (did an --all-help and no clue).
Is it possible?
TIA.
Hey
While trying to debug another issue I had some problems with the log levels. With the following line in a config:
log_level = "trace"
I would expect all the trace statements in main.rs
/server.rs
to work, but they do not seem to print anything. If I replace trace!
with info!
it prints the statements as expected. Since I don't have experience with rust, I'm not sure what's going on there or if this is expected.
But the issue I was actually trying to debug was running udpt
with a Java BT library that supposedly supports UDP trackers, but not being able to getting the two to work together. So after adding some more log outputs in server.rs
, it seems like udpt
receives what the Java library sends:
2021-06-04T15:25:14.682090500+02:00 [udpt_rs::server][INFO] handle_packet payload=[
0x00,
0x00,
0x00,
0x09,
0xB7,
0x21,
0x0C,
0x1C,
0x00,
0x00,
0x00,
0x00,
0x4F,
0x8B,
0xF3,
0xAD,
]
But then after unpack
of the UDPRequestHeader
, all fields are 0.
2021-06-04T15:25:14.684569100+02:00 [udpt_rs::server][INFO] handle_connect connection_id=0 transaction_id=0 remote_addr=127.0.0.1:61812
Which causes if header.connection_id != PROTOCOL_ID
in handle_connect
to fail.
I have tested the Java Library with a public UDP tracker and it seemed to work.
I'm building udpt-rs.exe
on Windows 10, using cargo 1.52.0 and Visual Studio Build Tools 2019 that I both just installed for this.
Would love to get some hints as to where the problem could be.
-Chris
As can seed by this wireshark dump
the result has some endpoint list but not return the amount os seeders and leechers
Obs: this dump is the announce response.
00:00:00:01:00:00:04:bc:00:00:00:0a:00:00:00:00:00:00:00:00:c0:a8:00:0f:bd:00:c0:a8:00:0f:a1:5e:c0:a8:00:0f:93:8a:c0:a8:00:0f:ba:92:c0:a8:00:0f:ce:a7:c0:a8:00:0f:c0:d0:c0:a8:00:0f:e7:d4:c0:a8:00:0f:b0:ef:c0:a8:00:0f:98:f5:c0:a8:00:0f:86:fa
here i have break to seed better
00:00:00:01 <- action
00:00:04:bc <- transaction_id
00:00:00:0a <- update interval
00:00:00:00 <- leechers
00:00:00:00 <- seeders
endpoint list
c0:a8:00:0f:bd:00
c0:a8:00:0f:a1:5e
c0:a8:00:0f:93:8a
c0:a8:00:0f:ba:92
c0:a8:00:0f:ce:a7
c0:a8:00:0f:c0:d0
c0:a8:00:0f:e7:d4
c0:a8:00:0f:b0:ef
c0:a8:00:0f:98:f5
c0:a8:00:0f:86:fa
Allow UDPT to be a daemon on linux-based systems.
Heya!
Tried setting this up for private purposes, however qBitTorrent fails to connect to my server with "Unreachable". I can interact with the REST API just fine, and other UDP trackers work well.
I've tried digging into this issue and my server reports that it receives the client package announcing the torrent, however the server is not sending a reply back. I can rule out the possibility of firewall here because I was able to replicate this issue in a DMZ setup.
Any ideas? I haven't tried the last release yet, only built myself.
This is maybe a dumb issue or a mistake I made but I get this error code while trying to compile it via cargo build --release: cargo build --release Compiling tokio v1.1.0 Compiling serde v1.0.120 Compiling pin-project v0.4.27 Compiling pin-project v1.0.4 Compiling tracing-futures v0.2.4 error: unexpected
selfparameter in function --> /home/oops/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.1.0/src/net/tcp/stream.rs:624:40 | 624 | pub fn try_read_buf<B: BufMut>(&self, buf: &mut B) -> io::Result<usize> { | ^^^^^ not valid as function parameter | = note:
self` is only valid as the first parameter of an associated function
error: expected one of async
, const
, crate
, default
, extern
, fn
, pub
, type
, or unsafe
, found #[doc = r" Try to read data from the stream into the provided buffer, advancing the"] #[doc = r" buffer's internal cursor, returning how many bytes were read."] #[doc = r""] #[doc = r" Receives any pending data from the socket but does not wait for new data"] #[doc = r" to arrive. On success, returns the number of bytes read. Because"] #[doc = r"
try_read_buf() is non-blocking, the buffer does not have to be stored by"] #[doc = r" the async task and can exist entirely on the stack."] #[doc = r""] #[doc = r" Usually, [
readable()] or [
ready()] is used with this function."] #[doc = r""] #[doc = r" [
readable()]: TcpStream::readable()"] #[doc = r" [
ready()]: TcpStream::ready()"] #[doc = r""] #[doc = r" # Return"] #[doc = r""] #[doc = r" If data is successfully read,
Ok(n)is returned, where
nis the"] #[doc = r" number of bytes read.
Ok(0)indicates the stream's read half is closed"] #[doc = r" and will no longer yield data. If the stream is not ready to read data"] #[doc = r"
Err(io::ErrorKind::WouldBlock)is returned."] #[doc = r""] #[doc = r" # Examples"] #[doc = r""] #[doc = r" ```no_run"] #[doc = r" use tokio::net::TcpStream;"] #[doc = r" use std::error::Error;"] #[doc = r" use std::io;"] #[doc = r""] #[doc = r" #[tokio::main]"] #[doc = r" async fn main() -> Result<(), Box<dyn Error>> {"] #[doc = r" // Connect to a peer"] #[doc = r#" let stream = TcpStream::connect("127.0.0.1:8080").await?;"#] #[doc = r""] #[doc = r" loop {"] #[doc = r" // Wait for the socket to be readable"] #[doc = r" stream.readable().await?;"] #[doc = r""] #[doc = r" let mut buf = Vec::with_capacity(4096);"] #[doc = r""] #[doc = r" // Try to read data, this may still fail with
WouldBlock"] #[doc = r" // if the readiness event is a false positive."] #[doc = r" match stream.try_read_buf(&mut buf) {"] #[doc = r" Ok(0) => break,"] #[doc = r" Ok(n) => {"] #[doc = r#" println!("read {} bytes", n);"#] #[doc = r" }"] #[doc = r" Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {"] #[doc = r" continue;"] #[doc = r" }"] #[doc = r" Err(e) => {"] #[doc = r" return Err(e.into());"] #[doc = r" }"] #[doc = r" }"] #[doc = r" }"] #[doc = r""] #[doc = r" Ok(())"] #[doc = r" }"] #[doc = r" ```"] pub fn try_read_buf<B: BufMut>(self: (/*ERROR*/), buf: &mut B) -> io::Result<usize> { self.io.registration().try_io(Interest::READABLE, || { use std::io::Read; let dst = buf.chunk_mut(); let dst = unsafe { &mut *(dst as *mut _ as *mut [std::mem::MaybeUninit<u8>] as *mut [u8]) }; let n = (&*self.io).read(dst)?; unsafe { buf.advance_mut(n); } Ok(n) }) }
--> /home/oops/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.1.0/src/macros/cfg.rs:132:13
|
131 | #[cfg_attr(docsrs, doc(cfg(feature = "io-util")))]
| - expected one of 9 possible tokens
132 | $item
| ^^^^^ unexpected token
|
::: /home/oops/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.1.0/src/net/tcp/stream.rs:566:5
|
566 | / cfg_io_util! {
567 | | /// Try to read data from the stream into the provided buffer, advancing the
568 | | /// buffer's internal cursor, returning how many bytes were read.
569 | | ///
... |
642 | | }
643 | | }
| |_____- in this macro invocation
error: aborting due to 2 previous errors
error: could not compile tokio
.
warning: build failed, waiting for other jobs to finish...
error: build failed`
./udpt --config
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injectorboost::program_options::invalid_command_line_syntax >'
what(): the required argument for option '--config' is missing
Aborted (core dumped)
Hi. I have created a torrent file to test that everything is working correctly. I put in this for the tracker: udp:/ipaddress:port
However on the consone window on my vps server I get 500 access denyed. I am able to type the address into my browser and see that the server is running. How can I fix this? I have an access token, but I am not sure where to enter it in the tracker info. I use qbittorrent.
Hi!,
udpt ran as daemon or interactively seems to ignore my logging configuration:
Here is my configuration file regarding logging:
[logging]
filename=/mnt/dcpbank/tracker/build/udpt/tracker.log
filename=/tmp/tracker.log
level=debug
And here is the starting of udpt in interactive mode (interrupted after some time by CTRL+C:
blowjog@blowjog:/mnt/dcpbank/tracker/build/udpt$ ./udpt -i -c tracker.conf
1454351720: (I): Starting maintenance thread (1/6)
1454351720: (I): Starting thread (2/6)
1454351720: (I): Starting thread (3/6)
1454351720: (I): Starting thread (4/6)
1454351720: (I): Starting thread (5/6)
1454351720: (I): Starting thread (6/6)
1 Clients Dumped.
E:(null)
1 Clients Dumped.
E:(null)
^C
What did I miss?
Same solution like issue #10.
As it cannot be handled by bunzip2
. Working on it
This was on Ubuntu 13.10
1. run make all
Output:
/udpt$ make all
g++ -c -o main.o src/main.cpp
g++ -c -o udpTracker.o src/udpTracker.cpp
g++ -c -o database.o src/db/database.cpp
g++ -c -o driver_sqlite.o src/db/driver_sqlite.cpp
g++ -c -o settings.o src/settings.cpp
cc -c -o tools.o src/tools.c
g++ -c -o httpserver.o src/http/httpserver.cpp
g++ -c -o webapp.o src/http/webapp.cpp
g++ -c -o logging.o src/logging.cpp
Linking...
g++ -O3 -o udpt main.o udpTracker.o database.o driver_sqlite.o settings.o
tools.o httpserver.o webapp.o logging.o -lsqlite3
/usr/bin/ld: udpTracker.o: undefined reference to symbol
'pthread_cancel@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from
command line
collect2: error: ld returned 1 exit status
make: *** [udpt] Error 1
fix:
I added -pthread to the make file
...
@echo Linking...
$(CXX) -O3 -o $(target) $(objects) $(LDFLAGS) -lsqlite3 -pthread
@echo Done.
...
output after fix:
/udpt$ make all
g++ -c -o main.o src/main.cpp
g++ -c -o udpTracker.o src/udpTracker.cpp
g++ -c -o database.o src/db/database.cpp
g++ -c -o driver_sqlite.o src/db/driver_sqlite.cpp
g++ -c -o settings.o src/settings.cpp
cc -c -o tools.o src/tools.c
g++ -c -o httpserver.o src/http/httpserver.cpp
g++ -c -o webapp.o src/http/webapp.cpp
g++ -c -o logging.o src/logging.cpp
Linking...
g++ -O3 -o udpt main.o udpTracker.o database.o driver_sqlite.o settings.o
tools.o httpserver.o webapp.o logging.o -lsqlite3 -pthread
Done.
Original issue reported on code.google.com by [email protected]
on 10 Apr 2014 at 3:56
i need to setup the database file thingy
Is there an API curl example for how to pass the authorization token?
I plan to run a small retracker and I found that udpt perfectly suits my needs.
Thanks for the brilliant idea (small UDP tracker wihout «fill-sized RDBMS»
backend) and good work!
Some issues after 1st build and run:
1. Seems that makefile does not have install phase and udpt binary but be
installed manually.
2. Some mess with config file – this file (together with db file) created in
current directory, which is very strange :) More, path_to_config as first
argument is ignored and some parsing errors are detected (If you're interested
I'll investigate this further). I expected more or less «standard»
3. Logging. Stdout only? Some *funny* messages like «E:(null)» or «[not an
error]» – is not so obvious :)
By the way, I've created simple ebuild for Gentoo – if you think to put it
together with debian packages, I'll gladly share it.
Original issue reported on code.google.com by [email protected]
on 10 Aug 2013 at 4:30
I've created initscript to run udpt (daemonized) in such way:
start-stop-daemon --start --background --make-pidfile \
--pidfile ${PID_FILE} \
-1 ${LOG_FILE} -2 ${ERROR_LOG_FILE} \
--exec ${DAEMON} -- ${CONF_FILE}
I run script in one terminal window (start-stop-daemon has detached and I see
bash prompt) and watching for the output (tail -f ${LOG_FILE}) in other
terminal window. But when I press any key in first terminal, udpt is gracefully
terminated (I saw «Goodbye.» and «threads terminated» in second terminal).
Very funny :)
Original issue reported on code.google.com by [email protected]
on 13 Aug 2013 at 11:12
What's the project status since all builds are deprecated?
Original issue reported on code.google.com by [email protected]
on 11 Nov 2014 at 11:04
Hello, after I run: cargo run
Finished dev [unoptimized + debuginfo] target(s) in 4m 20s
Running target/debug/udpt-rs
error: The following required arguments were not provided:
-c <config>
USAGE:
udpt-rs -c <config>
For more information try --help
I built UDPT for Ubuntu 16.04, but there is no any output. It works fine (as I can see), but it is totally silent.
No log file created and there is no any stdout in interactive mode.
Package can be found here -- https://launchpad.net/~mystic-mirage/+archive/ubuntu/udpt
In this mode, if a peer asks for an unknown torrent over UDP, we start tracking it.
my udpt is running with this configuration file regarding tracker and apiserver:
[tracker]
is_dynamic=1
port=6203
threads=5
allow_remotes=1
allow_iana_ips=0
announce_interval=60
cleanup_interval=120
[apiserver]
enable=1
threads=1
port=6203
When I remotely create a torrent, placing udp://<mytracker_IP>:6203/announce, my BT client (Transmission) is reporting "could not connect to tracker"
I can see TCP/6203 is listening on my server running udpt (netstat -tanp|grep -i listen | grep 6203 - cool
But when I try to test UDP/6203, seems it's not binded:
blowjog@blowjog:/mnt/dcpbank/tracker/build/udpt$ nc -vnzu 127.0.0.1 6203
(UNKNOWN) [127.0.0.1] 6203 (?) : Connection refused
As I've got no log (see #19 ), this is the only way I did find to test - do I did something wrong?
TIA for any answer :)
lem
ctrl-c
doesn't kill the server. This is the output:
➜ Downloads ./udpt-rs -c udpt.toml 1590073778[udpt_rs][INFO] logging initialized. 1590073778[actix_net::server::server][INFO] Starting 4 workers 1590073778[actix_net::server::server][INFO] Starting server on 192.168.1.149:1200 ^C1590073780[actix_net::server::server][INFO] SIGINT received, exiting 1590073780[actix_net::server::worker][INFO] Shutting down worker, 0 connections 1590073780[actix_net::server::worker][INFO] Shutting down worker, 0 connections 1590073780[actix_net::server::worker][INFO] Shutting down worker, 0 connections 1590073780[actix_net::server::worker][INFO] Shutting down worker, 0 connections ^C1590073780[actix_net::server::server][INFO] SIGINT received, exiting
Then it just hangs...
Am using Xubuntu linux 18.04.
Perhaps the way to do this would be to add an ifdef for osx at the top of
multiplatform.h that also defines another macro for the platform string
included in the version string.
Quick work around:
Add "#define linux" at the top of src/multiplatform.h.
It will compile with no issues.
Original issue reported on code.google.com by [email protected]
on 11 Mar 2013 at 9:30
Binding to all interfaces is not always appropriate. Suggesting to add
configurable ability to choose needed ones, in form: bind = IP maybe bind =
IP[,IP…].
Original issue reported on code.google.com by [email protected]
on 11 Aug 2013 at 7:28
Replace existing logger with boost logger.
Move to C++11 threads from native threads.
Same like issue #12 just for Windows.
ignore
I would like to work on these part if nobody has started it?
Thanks.
Hello naim94a. I've done what you tell in readme:
git clone https://github.com/naim94a/udpt.git
cd udpt
cargo build --release
The last step give me this error:
error: failed to parse manifest at /home/ripoyet/install/udpt/Cargo.toml
Caused by:
invalid type: string "thin", expected a boolean for key profile.release.lto
Please, help me. Thanks.
Hi. Thanks for your software. I'm a little new in Linux. I've installed udpt in my Odroid C2 with Dietpi. Linux show me one problem that I don't know to resolve. This is the problem:
g++ -g -std=gnu++11 -c -o main.o src/main.cpp -DBOOST_LOG_DYN_LINK
src/main.cpp:27:37: fatal error: boost/program_options.hpp: No such file or directory
#include <boost/program_options.hpp>
^
compilation terminated.
Makefile:28: recipe for target 'main.o' failed
make: *** [main.o] Error 1
If you could show me the way, I'll thankful.
Thanks in advance.
When trying to compile updt on Centos it failed:
i had to remove
typedef struct hostent HOSTENT;
From /udpt/src/multiplatform.h as its defined twice and secondly remove
#include "multiplatform.h"
from /udpt/src/udpTracker.h
Original issue reported on code.google.com by [email protected]
on 14 Jan 2013 at 2:35
Hi,
I'm trying to use the API examples but keep getting the following error when adding a hash:
curl "http://127.0.0.1:1338/api?action=add&hash=**********************************"
returns:
<H2>Not Found</H2>
My udpt.conf file is as follows:
[db]
driver=sqlite3
param=/home/udpt/udpt/udpt.db
[tracker]
is_dynamic=no
port=1337
threads=5
allow_remotes=yes
allow_iana_ips=no
announce_interval=1800
cleanup_interval=120
[apiserver]
enable=yes
iface=127.0.0.1
port=1338
[logging]
filename=udpt-log.log
level=info
Any advice would be appreciated.
Docker Hub allows you to create Automated Builds from source: https://docs.docker.com/docker-hub/builds/
It would add another packaging/distribution/installation method, whose buildings would be triggered automatically on each commit. It also allows to create different image tags from git tags & branches.
Also, documentation could easily include a canonical docker run
statement to quickly spin up a udpt instance with just a single command.
By making the image build via an AB, you give the resulting image verifiability and auditability. Also, the build is fully automatic. You can have the latest image tag build from HEAD and individual image tags from git's release tags.
Some people avoid non-verifiable (manually uploaded) images due to security & traceability reasons.
Docker search command clearly displays AB when listing images (mine is shown):
$ docker search udpt
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
pataquets/udpt udpt 0 [OK]
[...]
pataquets/udpt-src udpt build from source 0 [OK]
Just a free Docker Hub account and a quick setup would do. Ping me if you need help.
See also #38.
I m not a rust man.
I use https://c2rust.com/ to generate rust sources from http://www.netzmafia.de/skripten/unix/linux-daemon-howto.html . As link says it’s a code for make a deamon. I see it’s not check on the readme TODO.
#![allow(dead_code, mutable_transmutes, non_camel_case_types, non_snake_case,
non_upper_case_globals, unused_assignments, unused_mut)]
#![register_tool(c2rust)]
#![feature(main, register_tool)]
extern "C" {
#[no_mangle]
fn umask(__mask: __mode_t) -> __mode_t;
#[no_mangle]
fn exit(_: libc::c_int) -> !;
#[no_mangle]
fn close(__fd: libc::c_int) -> libc::c_int;
#[no_mangle]
fn sleep(__seconds: libc::c_uint) -> libc::c_uint;
#[no_mangle]
fn chdir(__path: *const libc::c_char) -> libc::c_int;
#[no_mangle]
fn setsid() -> __pid_t;
#[no_mangle]
fn fork() -> __pid_t;
}
pub type __mode_t = libc::c_uint;
pub type __pid_t = libc::c_int;
pub type pid_t = __pid_t;
unsafe fn main_0() -> libc::c_int {
/* Our process ID and Session ID */
let mut pid: pid_t = 0;
let mut sid: pid_t = 0;
/* Fork off the parent process */
pid = fork();
if pid < 0 as libc::c_int { exit(1 as libc::c_int); }
/* If we got a good PID, then
we can exit the parent process. */
if pid > 0 as libc::c_int { exit(0 as libc::c_int); }
/* Change the file mode mask */
umask(0 as libc::c_int as __mode_t);
/* Open any logs here */
/* Create a new SID for the child process */
sid = setsid();
if sid < 0 as libc::c_int {
/* Log the failure */
exit(1 as libc::c_int);
}
/* Change the current working directory */
if chdir(b"/\x00" as *const u8 as *const libc::c_char) < 0 as libc::c_int
{
/* Log the failure */
exit(1 as libc::c_int);
}
/* Close out the standard file descriptors */
close(0 as libc::c_int);
close(1 as libc::c_int);
close(2 as libc::c_int);
loop
/* Daemon-specific initialization goes here */
/* The Big Loop */
/* Do some task here ... */
{
sleep(30 as libc::c_int as libc::c_uint);
/* wait 30 seconds */
};
}
#[main]
pub fn main() { unsafe { ::std::process::exit(main_0() as i32) } }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.