Skip to content

Commit

Permalink
passwall : optimize trojan
Browse files Browse the repository at this point in the history
trojan tcp use the native nat mode.
  • Loading branch information
Lienol committed Nov 9, 2019
1 parent ce0f63f commit f4c0efd
Show file tree
Hide file tree
Showing 4 changed files with 262 additions and 218 deletions.
2 changes: 1 addition & 1 deletion lienol/luci-app-passwall/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=luci-app-passwall
PKG_VERSION:=2.0
PKG_RELEASE:=91-20191110
PKG_RELEASE:=92-20191110

PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PO2LMO:=./po2lmo
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
local ucursor = require"luci.model.uci".cursor()
local json = require "luci.jsonc"
local server_section = arg[1]
local proto = arg[2]
local redir_port = arg[3]
local socks5_proxy_port = arg[4]
local run_type = arg[2]
local proxy_port = arg[3]
local server = ucursor:get_all("passwall", server_section)

local trojan = {
run_type = "client",
run_type = run_type,
local_addr = "0.0.0.0",
local_port = socks5_proxy_port,
local_port = proxy_port,
remote_addr = server.server,
remote_port = tonumber(server.server_port),
password = {server.password},
Expand All @@ -28,7 +27,7 @@ local trojan = {
tcp = {
no_delay = true,
keep_alive = true,
fast_open = false,
fast_open = (server.fast_open == "true") and true or false,
fast_open_qlen = 20
}
}
Expand Down
Loading

0 comments on commit f4c0efd

Please sign in to comment.