mirror of
				https://github.com/wangyu-/udp2raw.git
				synced 2025-10-30 09:45:34 +08:00 
			
		
		
		
	Compare commits
	
		
			10 Commits
		
	
	
		
			revert-455
			...
			f79d0b1472
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | f79d0b1472 | ||
|  | 4623f878e0 | ||
|  | e42f0e5732 | ||
|  | f49e6adedf | ||
|  | d1a9bcc4fb | ||
|  | bc8bd8c2f8 | ||
|  | ca16c3a5e6 | ||
|  | 7abe19c7d9 | ||
|  | ec416515f3 | ||
|  | 4559e6d47b | 
| @@ -33,3 +33,5 @@ target_link_libraries(udp2raw rt) | ||||
| target_link_libraries(udp2raw pthread) | ||||
| include_directories(SYSTEM "libev") | ||||
| include_directories(".") | ||||
|  | ||||
| install(TARGETS udp2raw) | ||||
|   | ||||
							
								
								
									
										13
									
								
								Dockerfile
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Dockerfile
									
									
									
									
									
								
							| @@ -1,13 +0,0 @@ | ||||
| FROM alpine:3.6 as builder | ||||
|  | ||||
| WORKDIR / | ||||
|  | ||||
| RUN apk add --no-cache git  build-base linux-headers && \ | ||||
|  git clone https://github.com/wangyu-/udp2raw-tunnel.git  && \ | ||||
|  cd udp2raw-tunnel && \ | ||||
|  make dynamic | ||||
|  | ||||
| FROM alpine:3.6 | ||||
| RUN apk add --no-cache libstdc++ iptables | ||||
| COPY --from=builder /udp2raw-tunnel/udp2raw_dynamic /bin/ | ||||
| ENTRYPOINT [ "/bin/udp2raw_dynamic" ] | ||||
| @@ -81,7 +81,7 @@ Assume your UDP is blocked or being QOS-ed or just poorly supported. Assume your | ||||
| Now,an encrypted raw tunnel has been established between client and server through TCP port 4096. Connecting to UDP port 3333 at the client side is equivalent to connecting to port 7777 at the server side. No UDP traffic will be exposed. | ||||
|  | ||||
| ### Note | ||||
| To run on Android, check [Android_Guide](/doc/android_guide.md) | ||||
| To run on Android, check [Android_Guide](https://github.com/wangyu-/udp2raw/wiki/Android-Guide) | ||||
|  | ||||
| `-a` option automatically adds an iptables rule (or a few iptables rules) for you, udp2raw relies on this iptables rule to work stably. Be aware you dont forget `-a` (its a common mistake). If you dont want udp2raw to add iptables rule automatically, you can add it manually(take a look at `-g` option) and omit `-a`. | ||||
|  | ||||
|   | ||||
| @@ -435,7 +435,7 @@ int send_safer(conn_info_t &conn_info, char type, const char *data, int len)  // | ||||
|         if (cipher_mode == cipher_xor) { | ||||
|             send_data_buf2[0] ^= gro_xor[0]; | ||||
|             send_data_buf2[1] ^= gro_xor[1]; | ||||
|         } else if (cipher_mode == cipher_aes128cbc || cipher_mode == cipher_aes128cbc) { | ||||
|         } else if (cipher_mode == cipher_aes128cbc || cipher_mode == cipher_aes128cfb) { | ||||
|             aes_ecb_encrypt1(send_data_buf2); | ||||
|         } | ||||
|     } | ||||
| @@ -586,7 +586,7 @@ int recv_safer_multi(conn_info_t &conn_info, vector<char> &type_arr, vector<stri | ||||
|             if (cipher_mode == cipher_xor) { | ||||
|                 recv_data[0] ^= gro_xor[0]; | ||||
|                 recv_data[1] ^= gro_xor[1]; | ||||
|             } else if (cipher_mode == cipher_aes128cbc || cipher_mode == cipher_aes128cbc) { | ||||
|             } else if (cipher_mode == cipher_aes128cbc || cipher_mode == cipher_aes128cfb) { | ||||
|                 aes_ecb_decrypt1(recv_data); | ||||
|             } | ||||
|             single_len = read_u16(recv_data); | ||||
|   | ||||
							
								
								
									
										2
									
								
								makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								makefile
									
									
									
									
									
								
							| @@ -103,7 +103,7 @@ linux:git_version | ||||
| 	${cc_local}   -o ${NAME}_$@          -I. ${SOURCES} ${PCAP} ${FLAGS} -lrt -ggdb -static -O2 ${MP} | ||||
|  | ||||
| freebsd:git_version | ||||
| 	${cc_local}   -o ${NAME}_$@        -I. ${SOURCES} ${PCAP} ${FLAGS} -lrt -ggdb -static -O2 ${MP} | ||||
| 	${cc_local}   -o ${NAME}_$@        -I. ${SOURCES} ${PCAP} ${FLAGS} -lrt -ggdb -static -libverbs -O2 ${MP} | ||||
|  | ||||
| mac:git_version | ||||
| 	${cc_local}   -o ${NAME}_$@        -I. ${SOURCES} ${PCAP} ${FLAGS} -ggdb -O2 ${MP} | ||||
|   | ||||
| @@ -702,7 +702,7 @@ void init_filter(int port) { | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     int dummy; | ||||
|     int dummy=0; | ||||
|  | ||||
|     int ret = setsockopt(raw_recv_fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(dummy));  // in case i forgot to remove | ||||
|     if (ret != 0) { | ||||
| @@ -841,7 +841,7 @@ void init_filter(int port) { | ||||
| void remove_filter() { | ||||
|     filter_port = 0; | ||||
| #ifdef UDP2RAW_LINUX | ||||
|     int dummy; | ||||
|     int dummy=0; | ||||
|     int ret = setsockopt(raw_recv_fd, SOL_SOCKET, SO_DETACH_FILTER, &dummy, sizeof(dummy)); | ||||
|     if (ret != 0) { | ||||
|         mylog(log_debug, "error remove fiter\n"); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user