small SDK proxy ifdef fix, rewording of sentence in readme

This commit is contained in:
Joseph Henry
2016-06-24 13:05:19 -07:00
parent b9a2427825
commit 58dddb9d2f
5 changed files with 11 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ new Thread(new Runnable() {
**Step 4: App permissions** **Step 4: App permissions**
- In order for your application to write the auth keys to the internal storage you'll need to set a few permissions in your `AndroidManifest.xml` file: - In order for your application to write the auth keys and network files to the internal storage you'll need to set a few permissions in your `AndroidManifest.xml` file at the same scope level as `<application>`:
``` ```
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

View File

@@ -4,7 +4,7 @@
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

View File

@@ -5,6 +5,9 @@ import android.os.Bundle;
import ZeroTier.SDK; import ZeroTier.SDK;
import java.net.InetSocketAddress;
import java.net.*;
public class MainActivity extends AppCompatActivity { public class MainActivity extends AppCompatActivity {
@Override @Override
@@ -18,5 +21,10 @@ public class MainActivity extends AppCompatActivity {
wrapper.startOneService(); // Calls to JNI code wrapper.startOneService(); // Calls to JNI code
} }
}).start(); }).start();
Socket s = new Socket();
SocketAddress proxyAddr = new InetSocketAddress("0.0.0.0", 1337);
Proxy proxy = new Proxy(Proxy.Type.SOCKS, proxyAddr);
} }
} }

View File

@@ -136,7 +136,7 @@ NetconEthernetTap::NetconEthernetTap(
// Start SOCKS5 Proxy server // Start SOCKS5 Proxy server
// For use when traditional syscall hooking isn't available (ex. some APIs on iOS and Android) // For use when traditional syscall hooking isn't available (ex. some APIs on iOS and Android)
#if defined(USE_SOCKS_PROXY) #if defined(USE_SOCKS_PROXY) || defined(__ANDROID__)
StartProxy(sockPath); StartProxy(sockPath);
#endif #endif