mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2026-01-27 12:40:36 +03:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d60fd8854 | ||
|
|
0d43ce60f5 | ||
|
|
8e3fa48510 | ||
|
|
50933ee0d6 | ||
|
|
bb66ab13a8 | ||
|
|
0c17702e9d | ||
|
|
b786d78d19 |
8
Makefile
8
Makefile
@@ -3,12 +3,12 @@ KMAKE_TARGETS := kmake kload kunload kreload xmod xtclean
|
||||
|
||||
.PHONY: $(USPACE_TARGETS) $(KMAKE_TARGETS) clean
|
||||
$(USPACE_TARGETS):
|
||||
@$(MAKE) -ef uspace.mk $@
|
||||
@$(MAKE) -f uspace.mk $@
|
||||
|
||||
$(KMAKE_TARGETS):
|
||||
@$(MAKE) -ef kmake.mk $@
|
||||
@$(MAKE) -f kmake.mk $@
|
||||
|
||||
clean:
|
||||
-@$(MAKE) -ef kmake.mk kclean
|
||||
@$(MAKE) -ef uspace.mk clean
|
||||
-@$(MAKE) -f kmake.mk kclean
|
||||
@$(MAKE) -f uspace.mk clean
|
||||
|
||||
|
||||
2
config.h
2
config.h
@@ -70,4 +70,4 @@ extern struct config_t config;
|
||||
// Larger packets will be fragmented. Applicable for Chrome's kyber.
|
||||
#define AVAILABLE_MTU 1384
|
||||
|
||||
static const char defaul_snistr[] = "googlevideo.com,ggpht.com,ytimg.com,l.google.com,youtube.com,play.google.com";
|
||||
static const char defaul_snistr[] = "googlevideo.com,ggpht.com,ytimg.com,youtube.com,play.google.com,youtu.be,googleapis.com,googleusercontent.com,gstatic.com,l.google.com";
|
||||
|
||||
19
mangle.c
19
mangle.c
@@ -408,8 +408,13 @@ struct verdict analyze_tls_data(
|
||||
|
||||
|
||||
unsigned int j = 0;
|
||||
for (unsigned int i = 0; i < config.domains_strlen; i++) {
|
||||
if (config.domains_str[i] == ',' || config.domains_str[i] == '\n') {
|
||||
for (unsigned int i = 0; i <= config.domains_strlen; i++) {
|
||||
if ( i > j &&
|
||||
(i == config.domains_strlen ||
|
||||
config.domains_str[i] == '\0' ||
|
||||
config.domains_str[i] == ',' ||
|
||||
config.domains_str[i] == '\n' )) {
|
||||
|
||||
unsigned int domain_len = (i - j);
|
||||
const char *sni_startp = sni_name + sni_len - domain_len;
|
||||
const char *domain_startp = config.domains_str + j;
|
||||
@@ -469,11 +474,11 @@ int gen_fake_sni(const struct iphdr *iph, const struct tcphdr *tcph,
|
||||
ntcph->th_dport = tcph->th_dport;
|
||||
ntcph->th_sport = tcph->th_sport;
|
||||
|
||||
#if FAKE_SNI_STRATEGY == FKSN_STRAT_TTL
|
||||
ntcph->ack = tcph->ack;
|
||||
ntcph->ack_seq = tcph->ack_seq;
|
||||
niph->ttl = FAKE_SNI_TTL;
|
||||
#endif
|
||||
if (config.fake_sni_strategy == FKSN_STRAT_TTL) {
|
||||
ntcph->seq = tcph->seq;
|
||||
ntcph->ack_seq = tcph->ack_seq;
|
||||
niph->ttl = config.fake_sni_ttl;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ DEPSDIR := $(BUILD_DIR)/deps
|
||||
CC:=gcc
|
||||
CCLD:=$(CC)
|
||||
LD:=ld
|
||||
override CFLAGS += -Wall -Wpedantic -Wno-unused-variable -I$(DEPSDIR)/include
|
||||
override CFLAGS += -Wall -Wpedantic -Wno-unused-variable -I$(DEPSDIR)/include -std=gnu11
|
||||
override LDFLAGS += -L$(DEPSDIR)/lib
|
||||
|
||||
LIBNFNETLINK_CFLAGS := -I$(DEPSDIR)/include
|
||||
@@ -64,7 +64,7 @@ $(LIBNETFILTER_QUEUE): $(LIBNFNETLINK) $(LIBMNL)
|
||||
|
||||
$(APP): $(OBJS) $(LIBNETFILTER_QUEUE) $(LIBMNL)
|
||||
@echo 'CCLD $(APP)'
|
||||
$(CCLD) $(OBJS) -o $(APP) $(LDFLAGS) -lmnl -lnetfilter_queue
|
||||
$(CCLD) $(OBJS) -o $(APP) $(LDFLAGS) -lmnl -lnetfilter_queue -lpthread
|
||||
|
||||
$(BUILD_DIR)/%.o: %.c $(LIBNETFILTER_QUEUE) $(LIBMNL) config.h
|
||||
@echo 'CC $@'
|
||||
|
||||
@@ -517,7 +517,7 @@ static int process_packet(const struct packet_data packet, struct queue_data qda
|
||||
|
||||
if (dlen > 1480) {
|
||||
if (config.verbose)
|
||||
fprintf(stderr, "WARNING! Google video packet is too big and may cause issues!\n");
|
||||
fprintf(stderr, "WARNING! Client Hello packet is too big and may cause issues!\n");
|
||||
}
|
||||
|
||||
uint8_t frag1[MNL_SOCKET_BUFFER_SIZE];
|
||||
|
||||
Reference in New Issue
Block a user