-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
80 changed files
with
13,976 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# generated files | ||
/bin/ | ||
/gen/ | ||
|
||
|
||
# look at local.properties.sample | ||
/local.properties | ||
|
||
# Eclipse stuff | ||
/.classpath | ||
/.project | ||
/.settings/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
language: android | ||
sudo: true | ||
android: | ||
components: | ||
- tools | ||
- platform-tools | ||
- extra-google-m2repository | ||
- extra-android-m2repository | ||
addons: | ||
# artifacts: | ||
# paths: | ||
# - $(git ls-files -o | grep libs/armeabi | tr "\n" ":") | ||
before_install: | ||
- sudo apt-get install ant | ||
install: | ||
- echo y | sdkmanager "ndk-bundle" | ||
# - echo y | sdkmanager "cmake;3.6.4111459" | ||
# - echo y | sdkmanager "lldb;3.1" | ||
# - sdkmanager --update | ||
before_script: | ||
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle | ||
- export SYSROOT="$ANDROID_NDK_HOME/platforms/android-19/arch-arm" | ||
- export CC="$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=$SYSROOT" | ||
|
||
script: | ||
# scripts excutes inside our repo directory on CI machine | ||
- cd jni/ | ||
- $ANDROID_HOME/ndk-bundle/ndk-build | ||
- cd ../libs | ||
- ls | ||
- mv "x86/udpxy" "x86/udpxy.x86" | ||
- mv "x86_64/udpxy" "x86_64/udpxy.x86_64" | ||
- mv "arm64-v8a/udpxy" "arm64-v8a/udpxy.arm64-v8a" | ||
- mv "armeabi-v7a/udpxy" "armeabi-v7a/udpxy.armeabi-v7a" | ||
- cd $TRAVIS_BUILD_DIR | ||
- ls | ||
|
||
deploy: | ||
provider: releases | ||
api_key: $GITHUB_TOKEN | ||
file: | ||
- "libs/x86/udpxy.x86" | ||
- "libs/x86_64/udpxy.x86_64" | ||
- "libs/arm64-v8a/udpxy.arm64-v8a" | ||
- "libs/armeabi-v7a/udpxy.armeabi-v7a" | ||
skip_cleanup: true | ||
on: | ||
all_branches: true | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
andudpxy: | ||
- Romain Vimont (®om) <[email protected]> | ||
|
||
udpxy: | ||
- Pavel V. Cherenkov <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.rom1v.andudpxy" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="9" | ||
android:targetSdkVersion="19" /> | ||
|
||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM gcc:latest | ||
ADD ./chipmunk /udpxy | ||
WORKDIR /udpxy | ||
RUN make && make install | ||
ENV PORT=80 | ||
EXPOSE $PORT | ||
CMD udpxy -T -p $PORT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
|
||
|
||
|
||
# Android udpxy | ||
Android library-project wrapper for **udpxy** UDP-to-HTTP Proxy Server. | ||
|
||
udpxy is a RTP-to-HTTP proxy server that will convert the RTP/UDP multicast stream to HTTP unicast. | ||
|
||
## Download & Usage | ||
Download *udpxy* binary for Android from [Release](https://github.com/ewwink/android-udpxy/releases) page, install `Termux` or any terminal emulator for Android and run the following command | ||
|
||
for single network interface | ||
|
||
./udpxy -p 8888 | ||
|
||
for multiple network interface | ||
|
||
./udpxy -vT -a wlan0 -m eth0 -p 8888 | ||
# or | ||
./udpxy -vT -a 192.168.1.2 -m 10.70.1.2 -p 8888 | ||
|
||
For **non-rooted** device you can't execute udpxy on `sdcard` or `internal storage` try to copy it to `/data/local/` and change permission to executable but if you can't you must use `wget` and download it from server. Open terminal emulator run the following command | ||
|
||
cd $HOME | ||
wget https://github.com/ewwink/android-udpxy/releases | ||
# or | ||
wget http://yourServer/udpxy | ||
chmod +x udpxy | ||
|
||
and then run previous command above. | ||
|
||
If it’s working you can see status page in your browser | ||
|
||
http://192.168.1.2:8888/status | ||
|
||
![udpxy-status](https://user-images.githubusercontent.com/760764/43703419-f2cf42a0-9986-11e8-8768-2a6d0dc109e9.png) | ||
|
||
### Play the stream | ||
Open your video player like `VLC`, `GoodPlayer` or `MX Player` and input the stream URL like | ||
|
||
http://192.168.1.2:8888/rtp/239.1.1.159:8928 | ||
|
||
This will start receiving an RTP multicast stream from `239.1.1.159` on port `8928` (which is ANTV in my setup) and will relay it over HTTP. | ||
|
||
## Options | ||
|
||
udpxy accepts the following options: | ||
|
||
`-v` Enable verbose output [default = disabled]. | ||
|
||
`-S` Enable client statistics [default = disabled]. | ||
|
||
`-T` Do NOT run as a daemon [default = daemon if root]. | ||
|
||
`-a` <listenaddr> IPv4 address/interface to listen on [default = 0.0.0.0]. | ||
|
||
`-m <mcast_ifc_addr>` IPv4 address/interface of (multicast) source [default = 0.0.0.0]. | ||
|
||
`-c <clients>` Maximum number of clients to accept [default = 3, max = 5000]. | ||
|
||
`-l <logfile>` Log output to file [default = stderr]. | ||
|
||
`-B <sizeK>` Buffer size (65536, 32Kb, 1Mb) for inbound (multicast) data [default = 2048 bytes]. | ||
|
||
`-R <msgs>` Maximum number of messages to buffer (-1 = all) [default = 1]. | ||
|
||
`-H <sec>` Maximum time (in seconds) to hold data in a buffer (-1 = unlimited) [default = 1]. | ||
|
||
`-n <nice_incr>` Nice value increment [default = 0]. | ||
|
||
`-M <sec>` Renew multicast subscription every M seconds (skip if 0) [default = 0]. | ||
|
||
`-p <port>` Port to listen on. | ||
|
||
## Compile for Android | ||
|
||
This will compile udpxy to binary, to create APK please read rom1v blog in the bottom. Download [NDK](https://developer.android.com/ndk/downloads/), extract and add the directory to your system `path`. | ||
|
||
git clone https://github.com/ewwink/android-udpxy.git | ||
cd android-udpxy/jni/ | ||
ndk-build | ||
|
||
The binary will be generated in `libs/` | ||
|
||
to compile to another OS just run `make` in `jni/` directory. | ||
|
||
--------------------- | ||
### credits: | ||
- Android wrapper by [rom1v](http://blog.rom1v.com/2014/03/compiler-un-executable-pour-android) | ||
- Original repo [udpxy](https://github.com/pcherenkov/udpxy) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project name="andudpxy" default="help"> | ||
|
||
<!-- The local.properties file is created and updated by the 'android' tool. | ||
It contains the path to the SDK. It should *NOT* be checked into | ||
Version Control Systems. --> | ||
<property file="local.properties" /> | ||
|
||
<!-- The ant.properties file can be created by you. It is only edited by the | ||
'android' tool to add properties to it. | ||
This is the place to change some Ant specific build properties. | ||
Here are some properties you may want to change/update: | ||
source.dir | ||
The name of the source directory. Default is 'src'. | ||
out.dir | ||
The name of the output directory. Default is 'bin'. | ||
For other overridable properties, look at the beginning of the rules | ||
files in the SDK, at tools/ant/build.xml | ||
Properties related to the SDK location or the project target should | ||
be updated using the 'android' tool with the 'update' action. | ||
This file is an integral part of the build system for your | ||
application and should be checked into Version Control Systems. | ||
--> | ||
<property file="ant.properties" /> | ||
|
||
<!-- if sdk.dir was not set from one of the property file, then | ||
get it from the ANDROID_HOME env var. | ||
This must be done before we load project.properties since | ||
the proguard config can use sdk.dir --> | ||
<property environment="env" /> | ||
<condition property="sdk.dir" value="${env.ANDROID_HOME}"> | ||
<isset property="env.ANDROID_HOME" /> | ||
</condition> | ||
|
||
<!-- The project.properties file is created and updated by the 'android' | ||
tool, as well as ADT. | ||
This contains project specific properties such as project target, and library | ||
dependencies. Lower level build properties are stored in ant.properties | ||
(or in .classpath for Eclipse projects). | ||
This file is an integral part of the build system for your | ||
application and should be checked into Version Control Systems. --> | ||
<loadproperties srcFile="project.properties" /> | ||
|
||
<!-- quick check on sdk.dir --> | ||
<fail | ||
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable." | ||
unless="sdk.dir" | ||
/> | ||
|
||
<!-- | ||
Import per project custom build rules if present at the root of the project. | ||
This is the place to put custom intermediary targets such as: | ||
-pre-build | ||
-pre-compile | ||
-post-compile (This is typically used for code obfuscation. | ||
Compiled code location: ${out.classes.absolute.dir} | ||
If this is not done in place, override ${out.dex.input.absolute.dir}) | ||
-post-package | ||
-post-build | ||
-pre-clean | ||
--> | ||
<import file="custom_rules.xml" optional="true" /> | ||
|
||
<!-- Import the actual build file. | ||
To customize existing targets, there are two options: | ||
- Customize only one target: | ||
- copy/paste the target into this file, *before* the | ||
<import> task. | ||
- customize it to your needs. | ||
- Customize the whole content of build.xml | ||
- copy/paste the content of the rules files (minus the top node) | ||
into this file, replacing the <import> task. | ||
- customize to your needs. | ||
*********************** | ||
****** IMPORTANT ****** | ||
*********************** | ||
In all cases you must update the value of version-tag below to read 'custom' instead of an integer, | ||
in order to avoid having your file be overridden by tools such as "android update project" | ||
--> | ||
<!-- version-tag: 1 --> | ||
<import file="${sdk.dir}/tools/ant/build.xml" /> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project> | ||
|
||
<!-- quick check on ndk.dir --> | ||
|
||
<fail | ||
message="Please set ndk.dir in local.properties or an NDK_ROOT environment variable" | ||
unless="ndk.dir" /> | ||
|
||
<target name="ndk-build" > | ||
|
||
<exec | ||
executable="${ndk.dir}/ndk-build" | ||
failonerror="true" > | ||
|
||
<arg value="NDK_DEBUG=0" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="copy-to-res" depends="ndk-build"> | ||
<copy file="${basedir}/libs/armeabi/udpxy" tofile="${basedir}/res/raw/udpxy" /> | ||
</target> | ||
|
||
<target name="-pre-build" depends="copy-to-res" /> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(call all-subdir-makefiles) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#Object files | ||
*.o | ||
udpxy.dep | ||
|
||
#RPM build folder | ||
build/ | ||
|
||
#Make binaries | ||
udpxy | ||
udpxrec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
LOCAL_PATH := $(call my-dir) | ||
|
||
include $(CLEAR_VARS) | ||
|
||
LOCAL_MODULE := udpxy | ||
LOCAL_SRC_FILES := udpxy.c sloop.c rparse.c util.c prbuf.c ifaddr.c ctx.c mkpg.c \ | ||
rtp.c uopt.c dpkt.c netop.c extrn.c main.c | ||
|
||
include $(BUILD_EXECUTABLE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"prod" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
23 |
Oops, something went wrong.