Skip to content

Commit cba2a92

Browse files
committed
1.0-23.12 (prod)
1 parent a42632e commit cba2a92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+13976
-0
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# generated files
2+
/bin/
3+
/gen/
4+
5+
6+
# look at local.properties.sample
7+
/local.properties
8+
9+
# Eclipse stuff
10+
/.classpath
11+
/.project
12+
/.settings/

.travis.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
language: android
2+
sudo: true
3+
android:
4+
components:
5+
- tools
6+
- platform-tools
7+
- extra-google-m2repository
8+
- extra-android-m2repository
9+
addons:
10+
# artifacts:
11+
# paths:
12+
# - $(git ls-files -o | grep libs/armeabi | tr "\n" ":")
13+
before_install:
14+
- sudo apt-get install ant
15+
install:
16+
- echo y | sdkmanager "ndk-bundle"
17+
# - echo y | sdkmanager "cmake;3.6.4111459"
18+
# - echo y | sdkmanager "lldb;3.1"
19+
# - sdkmanager --update
20+
before_script:
21+
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
22+
- export SYSROOT="$ANDROID_NDK_HOME/platforms/android-19/arch-arm"
23+
- export CC="$ANDROID_NDK_HOME/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=$SYSROOT"
24+
25+
script:
26+
# scripts excutes inside our repo directory on CI machine
27+
- cd jni/
28+
- $ANDROID_HOME/ndk-bundle/ndk-build
29+
- cd ../libs
30+
- ls
31+
- mv "x86/udpxy" "x86/udpxy.x86"
32+
- mv "x86_64/udpxy" "x86_64/udpxy.x86_64"
33+
- mv "arm64-v8a/udpxy" "arm64-v8a/udpxy.arm64-v8a"
34+
- mv "armeabi-v7a/udpxy" "armeabi-v7a/udpxy.armeabi-v7a"
35+
- cd $TRAVIS_BUILD_DIR
36+
- ls
37+
38+
deploy:
39+
provider: releases
40+
api_key: $GITHUB_TOKEN
41+
file:
42+
- "libs/x86/udpxy.x86"
43+
- "libs/x86_64/udpxy.x86_64"
44+
- "libs/arm64-v8a/udpxy.arm64-v8a"
45+
- "libs/armeabi-v7a/udpxy.armeabi-v7a"
46+
skip_cleanup: true
47+
on:
48+
all_branches: true
49+
tags: true

AUTHORS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
andudpxy:
2+
- Romain Vimont (®om) <rom@rom1v.com>
3+
4+
udpxy:
5+
- Pavel V. Cherenkov <pcherenkov@gmail.com>

AndroidManifest.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.rom1v.andudpxy" >
3+
4+
<uses-sdk
5+
android:minSdkVersion="9"
6+
android:targetSdkVersion="19" />
7+
8+
</manifest>

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM gcc:latest
2+
ADD ./chipmunk /udpxy
3+
WORKDIR /udpxy
4+
RUN make && make install
5+
ENV PORT=80
6+
EXPOSE $PORT
7+
CMD udpxy -T -p $PORT

README.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
2+
3+
4+
# Android udpxy
5+
Android library-project wrapper for **udpxy** UDP-to-HTTP Proxy Server.
6+
7+
udpxy is a RTP-to-HTTP proxy server that will convert the RTP/UDP multicast stream to HTTP unicast.
8+
9+
## Download & Usage
10+
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
11+
12+
for single network interface
13+
14+
./udpxy -p 8888
15+
16+
for multiple network interface
17+
18+
./udpxy -vT -a wlan0 -m eth0 -p 8888
19+
# or
20+
./udpxy -vT -a 192.168.1.2 -m 10.70.1.2 -p 8888
21+
22+
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
23+
24+
cd $HOME
25+
wget https://github.com/ewwink/android-udpxy/releases
26+
# or
27+
wget http://yourServer/udpxy
28+
chmod +x udpxy
29+
30+
and then run previous command above.
31+
32+
If it’s working you can see status page in your browser
33+
34+
http://192.168.1.2:8888/status
35+
36+
![udpxy-status](https://user-images.githubusercontent.com/760764/43703419-f2cf42a0-9986-11e8-8768-2a6d0dc109e9.png)
37+
38+
### Play the stream
39+
Open your video player like `VLC`, `GoodPlayer` or `MX Player` and input the stream URL like
40+
41+
http://192.168.1.2:8888/rtp/239.1.1.159:8928
42+
43+
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.
44+
45+
## Options
46+
47+
udpxy accepts the following options:
48+
49+
`-v` Enable verbose output [default = disabled].
50+
51+
`-S` Enable client statistics [default = disabled].
52+
53+
`-T` Do NOT run as a daemon [default = daemon if root].
54+
55+
`-a` <listenaddr> IPv4 address/interface to listen on [default = 0.0.0.0].
56+
57+
`-m <mcast_ifc_addr>` IPv4 address/interface of (multicast) source [default = 0.0.0.0].
58+
59+
`-c <clients>` Maximum number of clients to accept [default = 3, max = 5000].
60+
61+
`-l <logfile>` Log output to file [default = stderr].
62+
63+
`-B <sizeK>` Buffer size (65536, 32Kb, 1Mb) for inbound (multicast) data [default = 2048 bytes].
64+
65+
`-R <msgs>` Maximum number of messages to buffer (-1 = all) [default = 1].
66+
67+
`-H <sec>` Maximum time (in seconds) to hold data in a buffer (-1 = unlimited) [default = 1].
68+
69+
`-n <nice_incr>` Nice value increment [default = 0].
70+
71+
`-M <sec>` Renew multicast subscription every M seconds (skip if 0) [default = 0].
72+
73+
`-p <port>` Port to listen on.
74+
75+
## Compile for Android
76+
77+
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`.
78+
79+
git clone https://github.com/ewwink/android-udpxy.git
80+
cd android-udpxy/jni/
81+
ndk-build
82+
83+
The binary will be generated in `libs/`
84+
85+
to compile to another OS just run `make` in `jni/` directory.
86+
87+
---------------------
88+
### credits:
89+
- Android wrapper by [rom1v](http://blog.rom1v.com/2014/03/compiler-un-executable-pour-android)
90+
- Original repo [udpxy](https://github.com/pcherenkov/udpxy)
91+

build.xml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="andudpxy" default="help">
3+
4+
<!-- The local.properties file is created and updated by the 'android' tool.
5+
It contains the path to the SDK. It should *NOT* be checked into
6+
Version Control Systems. -->
7+
<property file="local.properties" />
8+
9+
<!-- The ant.properties file can be created by you. It is only edited by the
10+
'android' tool to add properties to it.
11+
This is the place to change some Ant specific build properties.
12+
Here are some properties you may want to change/update:
13+
14+
source.dir
15+
The name of the source directory. Default is 'src'.
16+
out.dir
17+
The name of the output directory. Default is 'bin'.
18+
19+
For other overridable properties, look at the beginning of the rules
20+
files in the SDK, at tools/ant/build.xml
21+
22+
Properties related to the SDK location or the project target should
23+
be updated using the 'android' tool with the 'update' action.
24+
25+
This file is an integral part of the build system for your
26+
application and should be checked into Version Control Systems.
27+
28+
-->
29+
<property file="ant.properties" />
30+
31+
<!-- if sdk.dir was not set from one of the property file, then
32+
get it from the ANDROID_HOME env var.
33+
This must be done before we load project.properties since
34+
the proguard config can use sdk.dir -->
35+
<property environment="env" />
36+
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
37+
<isset property="env.ANDROID_HOME" />
38+
</condition>
39+
40+
<!-- The project.properties file is created and updated by the 'android'
41+
tool, as well as ADT.
42+
43+
This contains project specific properties such as project target, and library
44+
dependencies. Lower level build properties are stored in ant.properties
45+
(or in .classpath for Eclipse projects).
46+
47+
This file is an integral part of the build system for your
48+
application and should be checked into Version Control Systems. -->
49+
<loadproperties srcFile="project.properties" />
50+
51+
<!-- quick check on sdk.dir -->
52+
<fail
53+
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."
54+
unless="sdk.dir"
55+
/>
56+
57+
<!--
58+
Import per project custom build rules if present at the root of the project.
59+
This is the place to put custom intermediary targets such as:
60+
-pre-build
61+
-pre-compile
62+
-post-compile (This is typically used for code obfuscation.
63+
Compiled code location: ${out.classes.absolute.dir}
64+
If this is not done in place, override ${out.dex.input.absolute.dir})
65+
-post-package
66+
-post-build
67+
-pre-clean
68+
-->
69+
<import file="custom_rules.xml" optional="true" />
70+
71+
<!-- Import the actual build file.
72+
73+
To customize existing targets, there are two options:
74+
- Customize only one target:
75+
- copy/paste the target into this file, *before* the
76+
<import> task.
77+
- customize it to your needs.
78+
- Customize the whole content of build.xml
79+
- copy/paste the content of the rules files (minus the top node)
80+
into this file, replacing the <import> task.
81+
- customize to your needs.
82+
83+
***********************
84+
****** IMPORTANT ******
85+
***********************
86+
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
87+
in order to avoid having your file be overridden by tools such as "android update project"
88+
-->
89+
<!-- version-tag: 1 -->
90+
<import file="${sdk.dir}/tools/ant/build.xml" />
91+
92+
</project>

custom_rules.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project>
3+
4+
<!-- quick check on ndk.dir -->
5+
6+
<fail
7+
message="Please set ndk.dir in local.properties or an NDK_ROOT environment variable"
8+
unless="ndk.dir" />
9+
10+
<target name="ndk-build" >
11+
12+
<exec
13+
executable="${ndk.dir}/ndk-build"
14+
failonerror="true" >
15+
16+
<arg value="NDK_DEBUG=0" />
17+
</exec>
18+
</target>
19+
20+
<target name="copy-to-res" depends="ndk-build">
21+
<copy file="${basedir}/libs/armeabi/udpxy" tofile="${basedir}/res/raw/udpxy" />
22+
</target>
23+
24+
<target name="-pre-build" depends="copy-to-res" />
25+
26+
</project>

jni/Android.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
include $(call all-subdir-makefiles)

jni/udpxy/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#Object files
2+
*.o
3+
udpxy.dep
4+
5+
#RPM build folder
6+
build/
7+
8+
#Make binaries
9+
udpxy
10+
udpxrec

jni/udpxy/Android.mk

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
LOCAL_PATH := $(call my-dir)
2+
3+
include $(CLEAR_VARS)
4+
5+
LOCAL_MODULE := udpxy
6+
LOCAL_SRC_FILES := udpxy.c sloop.c rparse.c util.c prbuf.c ifaddr.c ctx.c mkpg.c \
7+
rtp.c uopt.c dpkt.c netop.c extrn.c main.c
8+
9+
include $(BUILD_EXECUTABLE)

jni/udpxy/BLDTYPE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"prod"

jni/udpxy/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
23

0 commit comments

Comments
 (0)