Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1526766630 | ||
|
|
4e92ee6149 |
@@ -8,8 +8,8 @@ android {
|
|||||||
applicationId "com.streamplayer"
|
applicationId "com.streamplayer"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 35
|
targetSdk 35
|
||||||
versionCode 100108
|
versionCode 100111
|
||||||
versionName "10.1.8"
|
versionName "10.1.11"
|
||||||
buildConfigField "String", "DEVICE_REGISTRY_URL", '"http://194.163.191.200:4000"'
|
buildConfigField "String", "DEVICE_REGISTRY_URL", '"http://194.163.191.200:4000"'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,72 +12,72 @@ public final class ChannelRepository {
|
|||||||
|
|
||||||
private static List<StreamChannel> createChannels() {
|
private static List<StreamChannel> createChannels() {
|
||||||
List<StreamChannel> channels = new ArrayList<>(Arrays.asList(
|
List<StreamChannel> channels = new ArrayList<>(Arrays.asList(
|
||||||
new StreamChannel("ESPN", "https://streamtp10.com/global2.php?stream=espn"),
|
new StreamChannel("ESPN", "http://streamtp10.com/global2.php?stream=espn"),
|
||||||
new StreamChannel("ESPN 2", "https://streamtp10.com/global2.php?stream=espn2"),
|
new StreamChannel("ESPN 2", "http://streamtp10.com/global2.php?stream=espn2"),
|
||||||
new StreamChannel("ESPN 3", "https://streamtp10.com/global2.php?stream=espn3"),
|
new StreamChannel("ESPN 3", "http://streamtp10.com/global2.php?stream=espn3"),
|
||||||
new StreamChannel("ESPN 4", "https://streamtp10.com/global2.php?stream=espn4"),
|
new StreamChannel("ESPN 4", "http://streamtp10.com/global2.php?stream=espn4"),
|
||||||
new StreamChannel("ESPN 3 MX", "https://streamtp10.com/global2.php?stream=espn3mx"),
|
new StreamChannel("ESPN 3 MX", "http://streamtp10.com/global2.php?stream=espn3mx"),
|
||||||
new StreamChannel("ESPN 5", "https://streamtp10.com/global2.php?stream=espn5"),
|
new StreamChannel("ESPN 5", "http://streamtp10.com/global2.php?stream=espn5"),
|
||||||
new StreamChannel("Fox Sports 3 MX", "https://streamtp10.com/global2.php?stream=foxsports3mx"),
|
new StreamChannel("Fox Sports 3 MX", "http://streamtp10.com/global2.php?stream=foxsports3mx"),
|
||||||
new StreamChannel("ESPN 6", "https://streamtp10.com/global2.php?stream=espn6"),
|
new StreamChannel("ESPN 6", "http://streamtp10.com/global2.php?stream=espn6"),
|
||||||
new StreamChannel("Fox Sports MX", "https://streamtp10.com/global2.php?stream=foxsportsmx"),
|
new StreamChannel("Fox Sports MX", "http://streamtp10.com/global2.php?stream=foxsportsmx"),
|
||||||
new StreamChannel("ESPN 7", "https://streamtp10.com/global2.php?stream=espn7"),
|
new StreamChannel("ESPN 7", "http://streamtp10.com/global2.php?stream=espn7"),
|
||||||
new StreamChannel("Azteca Deportes", "https://streamtp10.com/global2.php?stream=azteca_deportes"),
|
new StreamChannel("Azteca Deportes", "http://streamtp10.com/global2.php?stream=azteca_deportes"),
|
||||||
new StreamChannel("Win Plus", "https://streamtp10.com/global2.php?stream=winplus"),
|
new StreamChannel("Win Plus", "http://streamtp10.com/global2.php?stream=winplus"),
|
||||||
new StreamChannel("DAZN 1", "https://streamtp10.com/global2.php?stream=dazn1"),
|
new StreamChannel("DAZN 1", "http://streamtp10.com/global2.php?stream=dazn1"),
|
||||||
new StreamChannel("Win Plus 2", "https://streamtp10.com/global2.php?stream=winplus2"),
|
new StreamChannel("Win Plus 2", "http://streamtp10.com/global2.php?stream=winplus2"),
|
||||||
new StreamChannel("DAZN 2", "https://streamtp10.com/global2.php?stream=dazn2"),
|
new StreamChannel("DAZN 2", "http://streamtp10.com/global2.php?stream=dazn2"),
|
||||||
new StreamChannel("Win Sports", "https://streamtp10.com/global2.php?stream=winsports"),
|
new StreamChannel("Win Sports", "http://streamtp10.com/global2.php?stream=winsports"),
|
||||||
new StreamChannel("DAZN LaLiga", "https://streamtp10.com/global2.php?stream=dazn_laliga"),
|
new StreamChannel("DAZN LaLiga", "http://streamtp10.com/global2.php?stream=dazn_laliga"),
|
||||||
new StreamChannel("Win Plus Online 1", "https://streamtp10.com/global2.php?stream=winplusonline1"),
|
new StreamChannel("Win Plus Online 1", "http://streamtp10.com/global2.php?stream=winplusonline1"),
|
||||||
new StreamChannel("Caracol TV", "https://streamtp10.com/global2.php?stream=caracoltv"),
|
new StreamChannel("Caracol TV", "http://streamtp10.com/global2.php?stream=caracoltv"),
|
||||||
new StreamChannel("Fox 1 AR", "https://streamtp10.com/global2.php?stream=fox1ar"),
|
new StreamChannel("Fox 1 AR", "http://streamtp10.com/global2.php?stream=fox1ar"),
|
||||||
new StreamChannel("Fox 2 USA", "https://streamtp10.com/global2.php?stream=fox_2_usa"),
|
new StreamChannel("Fox 2 USA", "http://streamtp10.com/global2.php?stream=fox_2_usa"),
|
||||||
new StreamChannel("Fox 2 AR", "https://streamtp10.com/global2.php?stream=fox2ar"),
|
new StreamChannel("Fox 2 AR", "http://streamtp10.com/global2.php?stream=fox2ar"),
|
||||||
new StreamChannel("TNT 1 GB", "https://streamtp10.com/global2.php?stream=tnt_1_gb"),
|
new StreamChannel("TNT 1 GB", "http://streamtp10.com/global2.php?stream=tnt_1_gb"),
|
||||||
new StreamChannel("TNT 2 GB", "https://streamtp10.com/global2.php?stream=tnt_2_gb"),
|
new StreamChannel("TNT 2 GB", "http://streamtp10.com/global2.php?stream=tnt_2_gb"),
|
||||||
new StreamChannel("Fox 3 AR", "https://streamtp10.com/global2.php?stream=fox3ar"),
|
new StreamChannel("Fox 3 AR", "http://streamtp10.com/global2.php?stream=fox3ar"),
|
||||||
new StreamChannel("Universo USA", "https://streamtp10.com/global2.php?stream=universo_usa"),
|
new StreamChannel("Universo USA", "http://streamtp10.com/global2.php?stream=universo_usa"),
|
||||||
new StreamChannel("DSports", "https://streamtp10.com/global2.php?stream=dsports"),
|
new StreamChannel("DSports", "http://streamtp10.com/global2.php?stream=dsports"),
|
||||||
new StreamChannel("Univision USA", "https://streamtp10.com/global2.php?stream=univision_usa"),
|
new StreamChannel("Univision USA", "http://streamtp10.com/global2.php?stream=univision_usa"),
|
||||||
new StreamChannel("DSports 2", "https://streamtp10.com/global2.php?stream=dsports2"),
|
new StreamChannel("DSports 2", "http://streamtp10.com/global2.php?stream=dsports2"),
|
||||||
new StreamChannel("Fox Deportes USA", "https://streamtp10.com/global2.php?stream=fox_deportes_usa"),
|
new StreamChannel("Fox Deportes USA", "http://streamtp10.com/global2.php?stream=fox_deportes_usa"),
|
||||||
new StreamChannel("DSports Plus", "https://streamtp10.com/global2.php?stream=dsportsplus"),
|
new StreamChannel("DSports Plus", "http://streamtp10.com/global2.php?stream=dsportsplus"),
|
||||||
new StreamChannel("Fox Sports 2 MX", "https://streamtp10.com/global2.php?stream=foxsports2mx"),
|
new StreamChannel("Fox Sports 2 MX", "http://streamtp10.com/global2.php?stream=foxsports2mx"),
|
||||||
new StreamChannel("TNT Sports Chile", "https://streamtp10.com/global2.php?stream=tntsportschile"),
|
new StreamChannel("TNT Sports Chile", "http://streamtp10.com/global2.php?stream=tntsportschile"),
|
||||||
new StreamChannel("Fox Sports Premium", "https://streamtp10.com/global2.php?stream=foxsportspremium"),
|
new StreamChannel("Fox Sports Premium", "http://streamtp10.com/global2.php?stream=foxsportspremium"),
|
||||||
new StreamChannel("TNT Sports", "https://streamtp10.com/global2.php?stream=tntsports"),
|
new StreamChannel("TNT Sports", "http://streamtp10.com/global2.php?stream=tntsports"),
|
||||||
new StreamChannel("ESPN MX", "https://streamtp10.com/global2.php?stream=espnmx"),
|
new StreamChannel("ESPN MX", "http://streamtp10.com/global2.php?stream=espnmx"),
|
||||||
new StreamChannel("ESPN Premium", "https://streamtp10.com/global2.php?stream=espnpremium"),
|
new StreamChannel("ESPN Premium", "http://streamtp10.com/global2.php?stream=espnpremium"),
|
||||||
new StreamChannel("ESPN 2 MX", "https://streamtp10.com/global2.php?stream=espn2mx"),
|
new StreamChannel("ESPN 2 MX", "http://streamtp10.com/global2.php?stream=espn2mx"),
|
||||||
new StreamChannel("TyC Sports", "https://streamtp10.com/global2.php?stream=tycsports"),
|
new StreamChannel("TyC Sports", "http://streamtp10.com/global2.php?stream=tycsports"),
|
||||||
new StreamChannel("TUDN USA", "https://streamtp10.com/global2.php?stream=tudn_usa"),
|
new StreamChannel("TUDN USA", "http://streamtp10.com/global2.php?stream=tudn_usa"),
|
||||||
new StreamChannel("Telefe", "https://streamtp10.com/global2.php?stream=telefe"),
|
new StreamChannel("Telefe", "http://streamtp10.com/global2.php?stream=telefe"),
|
||||||
new StreamChannel("TNT 3 GB", "https://streamtp10.com/global2.php?stream=tnt_3_gb"),
|
new StreamChannel("TNT 3 GB", "http://streamtp10.com/global2.php?stream=tnt_3_gb"),
|
||||||
new StreamChannel("TV Pública", "https://streamtp10.com/global2.php?stream=tv_publica"),
|
new StreamChannel("TV Pública", "http://streamtp10.com/global2.php?stream=tv_publica"),
|
||||||
new StreamChannel("Fox 1 USA", "https://streamtp10.com/global2.php?stream=fox_1_usa"),
|
new StreamChannel("Fox 1 USA", "http://streamtp10.com/global2.php?stream=fox_1_usa"),
|
||||||
new StreamChannel("Liga 1 Max", "https://streamtp10.com/global2.php?stream=liga1max"),
|
new StreamChannel("Liga 1 Max", "http://streamtp10.com/global2.php?stream=liga1max"),
|
||||||
new StreamChannel("Gol TV", "https://streamtp10.com/global2.php?stream=goltv"),
|
new StreamChannel("Gol TV", "http://streamtp10.com/global2.php?stream=goltv"),
|
||||||
new StreamChannel("VTV Plus", "https://streamtp10.com/global2.php?stream=vtvplus"),
|
new StreamChannel("VTV Plus", "http://streamtp10.com/global2.php?stream=vtvplus"),
|
||||||
new StreamChannel("ESPN Deportes", "https://streamtp10.com/global2.php?stream=espndeportes"),
|
new StreamChannel("ESPN Deportes", "http://streamtp10.com/global2.php?stream=espndeportes"),
|
||||||
new StreamChannel("Gol Perú", "https://streamtp10.com/global2.php?stream=golperu"),
|
new StreamChannel("Gol Perú", "http://streamtp10.com/global2.php?stream=golperu"),
|
||||||
new StreamChannel("TNT 4 GB", "https://streamtp10.com/global2.php?stream=tnt_4_gb"),
|
new StreamChannel("TNT 4 GB", "http://streamtp10.com/global2.php?stream=tnt_4_gb"),
|
||||||
new StreamChannel("SportTV BR 1", "https://streamtp10.com/global2.php?stream=sporttvbr1"),
|
new StreamChannel("SportTV BR 1", "http://streamtp10.com/global2.php?stream=sporttvbr1"),
|
||||||
new StreamChannel("SportTV BR 2", "https://streamtp10.com/global2.php?stream=sporttvbr2"),
|
new StreamChannel("SportTV BR 2", "http://streamtp10.com/global2.php?stream=sporttvbr2"),
|
||||||
new StreamChannel("SportTV BR 3", "https://streamtp10.com/global2.php?stream=sporttvbr3"),
|
new StreamChannel("SportTV BR 3", "http://streamtp10.com/global2.php?stream=sporttvbr3"),
|
||||||
new StreamChannel("Premiere 1", "https://streamtp10.com/global2.php?stream=premiere1"),
|
new StreamChannel("Premiere 1", "http://streamtp10.com/global2.php?stream=premiere1"),
|
||||||
new StreamChannel("Premiere 2", "https://streamtp10.com/global2.php?stream=premiere2"),
|
new StreamChannel("Premiere 2", "http://streamtp10.com/global2.php?stream=premiere2"),
|
||||||
new StreamChannel("Premiere 3", "https://streamtp10.com/global2.php?stream=premiere3"),
|
new StreamChannel("Premiere 3", "http://streamtp10.com/global2.php?stream=premiere3"),
|
||||||
new StreamChannel("ESPN NL 1", "https://streamtp10.com/global2.php?stream=espn_nl1"),
|
new StreamChannel("ESPN NL 1", "http://streamtp10.com/global2.php?stream=espn_nl1"),
|
||||||
new StreamChannel("ESPN NL 2", "https://streamtp10.com/global2.php?stream=espn_nl2"),
|
new StreamChannel("ESPN NL 2", "http://streamtp10.com/global2.php?stream=espn_nl2"),
|
||||||
new StreamChannel("ESPN NL 3", "https://streamtp10.com/global2.php?stream=espn_nl3"),
|
new StreamChannel("ESPN NL 3", "http://streamtp10.com/global2.php?stream=espn_nl3"),
|
||||||
new StreamChannel("Caliente TV MX", "https://streamtp10.com/global2.php?stream=calientetvmx"),
|
new StreamChannel("Caliente TV MX", "http://streamtp10.com/global2.php?stream=calientetvmx"),
|
||||||
new StreamChannel("USA Network", "https://streamtp10.com/global2.php?stream=usa_network"),
|
new StreamChannel("USA Network", "http://streamtp10.com/global2.php?stream=usa_network"),
|
||||||
new StreamChannel("TyC Internacional", "https://streamtp10.com/global2.php?stream=tycinternacional"),
|
new StreamChannel("TyC Internacional", "http://streamtp10.com/global2.php?stream=tycinternacional"),
|
||||||
new StreamChannel("Canal 5 MX", "https://streamtp10.com/global2.php?stream=canal5mx"),
|
new StreamChannel("Canal 5 MX", "http://streamtp10.com/global2.php?stream=canal5mx"),
|
||||||
new StreamChannel("TUDN MX", "https://streamtp10.com/global2.php?stream=TUDNMX"),
|
new StreamChannel("TUDN MX", "http://streamtp10.com/global2.php?stream=TUDNMX"),
|
||||||
new StreamChannel("FUTV", "https://streamtp10.com/global2.php?stream=futv"),
|
new StreamChannel("FUTV", "http://streamtp10.com/global2.php?stream=futv"),
|
||||||
new StreamChannel("LaLiga Hypermotion", "https://streamtp10.com/global2.php?stream=laligahypermotion")
|
new StreamChannel("LaLiga Hypermotion", "http://streamtp10.com/global2.php?stream=laligahypermotion")
|
||||||
));
|
));
|
||||||
channels.sort(Comparator.comparing(StreamChannel::getName, String.CASE_INSENSITIVE_ORDER));
|
channels.sort(Comparator.comparing(StreamChannel::getName, String.CASE_INSENSITIVE_ORDER));
|
||||||
return Collections.unmodifiableList(channels);
|
return Collections.unmodifiableList(channels);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class EventRepository {
|
|||||||
private static final long CACHE_DURATION = 24L * 60 * 60 * 1000; // 24 horas
|
private static final long CACHE_DURATION = 24L * 60 * 60 * 1000; // 24 horas
|
||||||
|
|
||||||
// URL única para eventos (actualizado para evitar bloqueos de ISP)
|
// URL única para eventos (actualizado para evitar bloqueos de ISP)
|
||||||
private static final String EVENTS_URL = "https://streamtp10.com/eventos.json";
|
private static final String EVENTS_URL = "http://streamtp10.com/eventos.json";
|
||||||
|
|
||||||
public interface Callback {
|
public interface Callback {
|
||||||
void onSuccess(List<EventItem> events);
|
void onSuccess(List<EventItem> events);
|
||||||
|
|||||||
@@ -28,10 +28,15 @@ import androidx.media3.common.util.UnstableApi;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
|
import java.security.cert.X509Certificate;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLContext;
|
||||||
|
import javax.net.ssl.TrustManager;
|
||||||
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.dnsoverhttps.DnsOverHttps;
|
import okhttp3.dnsoverhttps.DnsOverHttps;
|
||||||
@@ -236,7 +241,7 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
private MediaSource buildMediaSource(MediaItem mediaItem) {
|
private MediaSource buildMediaSource(MediaItem mediaItem) {
|
||||||
Map<String, String> headers = new HashMap<>();
|
Map<String, String> headers = new HashMap<>();
|
||||||
headers.put("Referer", channelUrl);
|
headers.put("Referer", channelUrl);
|
||||||
headers.put("Origin", "https://streamtp10.com");
|
headers.put("Origin", "http://streamtp10.com");
|
||||||
headers.put("Accept", "*/*");
|
headers.put("Accept", "*/*");
|
||||||
headers.put("Connection", "keep-alive");
|
headers.put("Connection", "keep-alive");
|
||||||
|
|
||||||
@@ -254,11 +259,30 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
OkHttpClient bootstrap = new OkHttpClient.Builder()
|
final TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
|
new X509TrustManager() {
|
||||||
|
@Override
|
||||||
|
public void checkClientTrusted(X509Certificate[] chain, String authType) {}
|
||||||
|
@Override
|
||||||
|
public void checkServerTrusted(X509Certificate[] chain, String authType) {}
|
||||||
|
@Override
|
||||||
|
public X509Certificate[] getAcceptedIssuers() {
|
||||||
|
return new X509Certificate[]{};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
final SSLContext sslContext = SSLContext.getInstance("SSL");
|
||||||
|
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
|
||||||
|
|
||||||
|
OkHttpClient.Builder builder = new OkHttpClient.Builder()
|
||||||
.connectTimeout(20, TimeUnit.SECONDS)
|
.connectTimeout(20, TimeUnit.SECONDS)
|
||||||
.readTimeout(30, TimeUnit.SECONDS)
|
.readTimeout(30, TimeUnit.SECONDS)
|
||||||
.retryOnConnectionFailure(true)
|
.retryOnConnectionFailure(true)
|
||||||
.build();
|
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustAllCerts[0])
|
||||||
|
.hostnameVerifier((hostname, session) -> true);
|
||||||
|
|
||||||
|
OkHttpClient bootstrap = builder.build();
|
||||||
|
|
||||||
DnsOverHttps dohDns = new DnsOverHttps.Builder()
|
DnsOverHttps dohDns = new DnsOverHttps.Builder()
|
||||||
.client(bootstrap)
|
.client(bootstrap)
|
||||||
@@ -268,10 +292,8 @@ public class PlayerActivity extends AppCompatActivity {
|
|||||||
InetAddress.getByName("8.8.4.4"))
|
InetAddress.getByName("8.8.4.4"))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
okHttpClient = bootstrap.newBuilder()
|
okHttpClient = builder.dns(dohDns).build();
|
||||||
.dns(dohDns)
|
} catch (Exception e) {
|
||||||
.build();
|
|
||||||
} catch (UnknownHostException e) {
|
|
||||||
okHttpClient = new OkHttpClient.Builder()
|
okHttpClient = new OkHttpClient.Builder()
|
||||||
.connectTimeout(20, TimeUnit.SECONDS)
|
.connectTimeout(20, TimeUnit.SECONDS)
|
||||||
.readTimeout(30, TimeUnit.SECONDS)
|
.readTimeout(30, TimeUnit.SECONDS)
|
||||||
|
|||||||
@@ -2,11 +2,15 @@ package com.streamplayer;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.security.cert.X509Certificate;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLContext;
|
||||||
|
import javax.net.ssl.TrustManager;
|
||||||
|
import javax.net.ssl.X509TrustManager;
|
||||||
|
|
||||||
import okhttp3.HttpUrl;
|
import okhttp3.HttpUrl;
|
||||||
import okhttp3.OkHttpClient;
|
import okhttp3.OkHttpClient;
|
||||||
import okhttp3.Request;
|
import okhttp3.Request;
|
||||||
@@ -28,14 +32,36 @@ public final class StreamUrlResolver {
|
|||||||
private static final OkHttpClient CLIENT;
|
private static final OkHttpClient CLIENT;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
OkHttpClient.Builder builder = new OkHttpClient.Builder()
|
OkHttpClient client = null;
|
||||||
.connectTimeout(15, TimeUnit.SECONDS)
|
|
||||||
.readTimeout(15, TimeUnit.SECONDS)
|
|
||||||
.followRedirects(true);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// DNS de Google (8.8.8.8)
|
final TrustManager[] trustAllCerts = new TrustManager[]{
|
||||||
OkHttpClient bootstrap = new OkHttpClient.Builder().build();
|
new X509TrustManager() {
|
||||||
|
@Override
|
||||||
|
public void checkClientTrusted(X509Certificate[] chain, String authType) {}
|
||||||
|
@Override
|
||||||
|
public void checkServerTrusted(X509Certificate[] chain, String authType) {}
|
||||||
|
@Override
|
||||||
|
public X509Certificate[] getAcceptedIssuers() {
|
||||||
|
return new X509Certificate[]{};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
final SSLContext sslContext = SSLContext.getInstance("SSL");
|
||||||
|
sslContext.init(null, trustAllCerts, new java.security.SecureRandom());
|
||||||
|
|
||||||
|
OkHttpClient.Builder builder = new OkHttpClient.Builder()
|
||||||
|
.connectTimeout(15, TimeUnit.SECONDS)
|
||||||
|
.readTimeout(15, TimeUnit.SECONDS)
|
||||||
|
.followRedirects(true)
|
||||||
|
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustAllCerts[0])
|
||||||
|
.hostnameVerifier((hostname, session) -> true);
|
||||||
|
|
||||||
|
OkHttpClient bootstrap = new OkHttpClient.Builder()
|
||||||
|
.sslSocketFactory(sslContext.getSocketFactory(), (X509TrustManager) trustAllCerts[0])
|
||||||
|
.hostnameVerifier((hostname, session) -> true)
|
||||||
|
.build();
|
||||||
|
|
||||||
DnsOverHttps dns = new DnsOverHttps.Builder()
|
DnsOverHttps dns = new DnsOverHttps.Builder()
|
||||||
.client(bootstrap)
|
.client(bootstrap)
|
||||||
.url(HttpUrl.get("https://dns.google/dns-query"))
|
.url(HttpUrl.get("https://dns.google/dns-query"))
|
||||||
@@ -44,11 +70,16 @@ public final class StreamUrlResolver {
|
|||||||
InetAddress.getByName("8.8.4.4"))
|
InetAddress.getByName("8.8.4.4"))
|
||||||
.build();
|
.build();
|
||||||
builder.dns(dns);
|
builder.dns(dns);
|
||||||
} catch (UnknownHostException e) {
|
|
||||||
// Fallback a DNS del sistema
|
client = builder.build();
|
||||||
|
} catch (Exception e) {
|
||||||
|
client = new OkHttpClient.Builder()
|
||||||
|
.connectTimeout(15, TimeUnit.SECONDS)
|
||||||
|
.readTimeout(15, TimeUnit.SECONDS)
|
||||||
|
.followRedirects(true)
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
CLIENT = client;
|
||||||
CLIENT = builder.build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private StreamUrlResolver() {
|
private StreamUrlResolver() {
|
||||||
@@ -77,7 +108,7 @@ public final class StreamUrlResolver {
|
|||||||
.header("User-Agent", USER_AGENT)
|
.header("User-Agent", USER_AGENT)
|
||||||
.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
|
.header("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
|
||||||
.header("Accept-Language", "es-ES,es;q=0.9,en;q=0.8")
|
.header("Accept-Language", "es-ES,es;q=0.9,en;q=0.8")
|
||||||
.header("Referer", "https://streamtp10.com/")
|
.header("Referer", "http://streamtp10.com/")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
try (Response response = CLIENT.newCall(request).execute()) {
|
try (Response response = CLIENT.newCall(request).execute()) {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 100300,
|
"versionCode": 100110,
|
||||||
"versionName": "10.0.3",
|
"versionName": "10.1.10",
|
||||||
"minSupportedVersionCode": 91000,
|
"minSupportedVersionCode": 0,
|
||||||
"forceUpdate": false,
|
"forceUpdate": false,
|
||||||
"downloadUrl": "https://gitea.cbcren.online/renato97/app/releases/download/v10.0.3/StreamPlayer-v10.0.3.apk",
|
"downloadUrl": "http://gitea.cbcren.online/renato97/app/releases/download/v10.1.10/StreamPlayer-v10.1.10-debug.apk",
|
||||||
"fileName": "StreamPlayer-v10.0.3.apk",
|
"fileName": "StreamPlayer-v10.1.10-debug.apk",
|
||||||
"sizeBytes": 0,
|
"sizeBytes": 9113609,
|
||||||
"notes": "StreamPlayer v10.0.3\n\nNovedades:\n- Fix: Evasión de bloqueos regionales mediante DNS de Google (DoH)\n- Corrección de error 'No se encontró la clave del stream'"
|
"notes": "Cambiar a HTTP para evitar errores de certificado"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user