Adjust port

pull/590/head
FongMi 12 months ago
parent 7cc9950e14
commit a75c625302
  1. 16
      README.md
  2. 2
      app/src/leanback/res/layout/dialog_proxy.xml
  3. 4
      app/src/main/java/com/fongmi/android/tv/server/Server.java
  4. 3
      app/src/mobile/java/com/fongmi/android/tv/utils/ScanTask.java
  5. 2
      app/src/mobile/res/layout/dialog_proxy.xml
  6. 2
      catvod/src/main/java/com/github/catvod/Proxy.java

@ -102,49 +102,49 @@ https://github.com/CatVodTVOfficial/CatVodTVJarLoader
刷新詳情
```
http://127.0.0.1:9978/action?do=refresh&type=detail
http://127.0.0.1:8964/action?do=refresh&type=detail
```
刷新播放
```
http://127.0.0.1:9978/action?do=refresh&type=player
http://127.0.0.1:8964/action?do=refresh&type=player
```
刷新直播
```
http://127.0.0.1:9978/action?do=refresh&type=live
http://127.0.0.1:8964/action?do=refresh&type=live
```
推送字幕
```
http://127.0.0.1:9978/action?do=refresh&type=subtitle&path=http://xxx
http://127.0.0.1:8964/action?do=refresh&type=subtitle&path=http://xxx
```
推送彈幕
```
http://127.0.0.1:9978/action?do=refresh&type=danmaku&path=http://xxx
http://127.0.0.1:8964/action?do=refresh&type=danmaku&path=http://xxx
```
新增緩存字串
```
http://127.0.0.1:9978/cache?do=set&key=xxx&value=xxx
http://127.0.0.1:8964/cache?do=set&key=xxx&value=xxx
```
取得緩存字串
```
http://127.0.0.1:9978/cache?do=get&key=xxx
http://127.0.0.1:8964/cache?do=get&key=xxx
```
刪除緩存字串
```
http://127.0.0.1:9978/cache?do=del&key=xxx
http://127.0.0.1:8964/cache?do=del&key=xxx
```
### Proxy

@ -34,7 +34,7 @@
android:layout_above="@+id/bottom"
android:layout_alignStart="@+id/info"
android:layout_marginBottom="10dp"
android:hint="socks5://127.0.0.1:9978"
android:hint="socks5://127.0.0.1:8964"
android:imeOptions="actionDone"
android:importantForAutofill="no"
android:inputType="text"

@ -19,7 +19,7 @@ public class Server {
}
public Server() {
this.port = 9978;
this.port = 8964;
}
public int getPort() {
@ -63,7 +63,7 @@ public class Server {
nano.stop();
nano = null;
}
} while (port < 9999);
} while (port < 10240);
}
public void stop() {

@ -3,6 +3,7 @@ package com.fongmi.android.tv.utils;
import com.fongmi.android.tv.App;
import com.fongmi.android.tv.bean.Device;
import com.fongmi.android.tv.server.Server;
import com.github.catvod.Proxy;
import com.github.catvod.net.OkHttp;
import java.util.ArrayList;
@ -73,7 +74,7 @@ public class ScanTask {
Set<String> urls = new HashSet<>(ips);
String local = Server.get().getAddress();
String base = local.substring(0, local.lastIndexOf(".") + 1);
for (int i = 1; i < 256; i++) urls.add(base + i + ":9978");
for (int i = 1; i < 256; i++) urls.add(base + i + ":" + Proxy.getPort());
return new ArrayList<>(urls);
}

@ -18,7 +18,7 @@
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="socks5://127.0.0.1:9978"
android:hint="socks5://127.0.0.1:8964"
android:imeOptions="actionDone"
android:importantForAutofill="no"
android:inputType="text"

@ -4,7 +4,7 @@ import com.github.catvod.utils.Util;
public class Proxy {
private static int port = 9978;
private static int port = -1;
public static void set(int port) {
Proxy.port = port;

Loading…
Cancel
Save