mirror of
				https://github.com/Ysurac/openmptcprouter-feeds.git
				synced 2025-03-09 15:40:03 +00:00 
			
		
		
		
	Changes with OpenVPN TCP
This commit is contained in:
		
							parent
							
								
									48c5b00085
								
							
						
					
					
						commit
						9d3249cfa6
					
				
					 3 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -545,7 +545,7 @@ function wizard_add()
 | 
			
		|||
 | 
			
		||||
	if default_vpn == "openvpn" then
 | 
			
		||||
		ucic:set("openvpn","omr","enabled",1)
 | 
			
		||||
		ucic:set("network","omrvpn","proto","dhcp")
 | 
			
		||||
		ucic:set("network","omrvpn","proto","none")
 | 
			
		||||
	else
 | 
			
		||||
		ucic:set("openvpn","omr","enabled",0)
 | 
			
		||||
	end
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -688,6 +688,8 @@ _set_config_from_vps() {
 | 
			
		|||
			set openvpn.omr.ca="/etc/luci-uploads/ca.crt"
 | 
			
		||||
			set openvpn.omr.enabled=$openvpn_state
 | 
			
		||||
			set openvpn.omr.tls_client=1
 | 
			
		||||
			set openvpn.omr.client=1
 | 
			
		||||
			set openvpn.omr.allow_recursive_routing=1
 | 
			
		||||
		EOF
 | 
			
		||||
		if [ "$(uci -q get openvpn.omr.remote)" != "127.0.0.1" ]; then
 | 
			
		||||
			uci -q set openvpn.omr.remote="$vpsip"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -24,7 +24,7 @@ if [ "$(uci -q get glorytun.vpn.localip)" = "10.0.0.2" ]; then
 | 
			
		|||
	EOF
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ "$(uci -q get openvpn.omr)" = "" ]; then
 | 
			
		||||
if [ "$(uci -q get openvpn.omr.proto)" != "tcp-client" ]; then
 | 
			
		||||
	uci -q batch <<-EOF >/dev/null
 | 
			
		||||
		set openvpn.omr=openvpn
 | 
			
		||||
		set openvpn.omr.dev=tun0
 | 
			
		||||
| 
						 | 
				
			
			@ -34,6 +34,9 @@ if [ "$(uci -q get openvpn.omr)" = "" ]; then
 | 
			
		|||
		set openvpn.omr.enabled=0
 | 
			
		||||
		set openvpn.omr.ncp_disable=1
 | 
			
		||||
		set openvpn.omr.auth_nocache=1
 | 
			
		||||
		set openvpn.omr.client=1
 | 
			
		||||
		set openvpn.omr.tls_client=1
 | 
			
		||||
		set openvpn.omr.allow_recursive_routing=1
 | 
			
		||||
		commit openvpn
 | 
			
		||||
	EOF
 | 
			
		||||
fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue