Delete excess ruby scripts

This commit is contained in:
Sergey Abramchuk 2020-03-06 11:02:46 +03:00
parent 02d1895396
commit aff379ba21
3 changed files with 0 additions and 124 deletions

View File

@ -1,64 +0,0 @@
# Your OpenVPN username
if ENV["OPENVPN_USERNAME"].nil?
ENV["OPENVPN_USERNAME"] = "Username"
end
# Your OpenVPN password
if ENV["OPENVPN_PASSWORD"].nil?
ENV["OPENVPN_PASSWORD"] = "Password"
end
# Your OpenVPN configuration
if ENV["OPENVPN_CONFIGURATION"].nil?
ENV["OPENVPN_CONFIGURATION"] = <<~END
client
dev tun
proto udp
remote X.X.X.X 1194
remote-random
resolv-retry infinite
nobind
cipher AES-256-CBC
auth SHA512
comp-lzo no
verb 3
tun-mtu 1500
tun-mtu-extra 32
mssfix 1450
persist-key
persist-tun
reneg-sec 0
remote-cert-tls server
auth-user-pass
pull
fast-io
<ca>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</ca>
key-direction 1
<tls-auth>
# 2048 bit OpenVPN static key
-----BEGIN OpenVPN Static key V1-----
...
-----END OpenVPN Static key V1-----
</tls-auth>
END
end
if ENV["OPENVPN_REMOTE_HOST"].nil?
ENV["OPENVPN_REMOTE_HOST"] = "Remote Host Address"
end
if ENV["OPENVPN_REMOTE_PORT"].nil?
ENV["OPENVPN_REMOTE_PORT"] = "Remote Host Port"
end

View File

@ -1,35 +0,0 @@
environment_file = File.join(ENV["SRCROOT"], "Scripts", "environment.rb")
if File.exist?(environment_file)
require "#{environment_file}"
end
require "erb"
if ENV["OPENVPN_USERNAME"].nil? || ENV["OPENVPN_PASSWORD"].nil? || ENV["OPENVPN_CONFIGURATION"].nil?
puts "warning: VPN profile data is missing, you need to fill VPNProfile.swift manually."
exit(true)
end
template_file = File.join(ENV["SRCROOT"], "Scripts", "vpn_profile_template.erb")
unless File.exist?(template_file)
puts "error: Template file does not exist."
exit(false)
end
output_file = File.join(ENV["SRCROOT"], "Tests", "VPNProfile.swift")
unless File.exist?(output_file)
puts "error: Output file does not exist."
exit(false)
end
OPENVPN_USERNAME = ENV["OPENVPN_USERNAME"]
OPENVPN_PASSWORD = ENV["OPENVPN_PASSWORD"]
OPENVPN_CONFIGURATION = ENV["OPENVPN_CONFIGURATION"]
OPENVPN_REMOTE_HOST = ENV["OPENVPN_REMOTE_HOST"]
OPENVPN_REMOTE_PORT = ENV["OPENVPN_REMOTE_PORT"]
template_content = File.read(template_file)
erb_template = ERB.new(template_content, nil, ">")
result = erb_template.result
File.write(output_file, result)

View File

@ -1,25 +0,0 @@
//
// VPNProfile.swift
// OpenVPNAdapter
//
// Created by Sergey Abramchuk on 27/09/2018.
//
// Do not commit changes of this file to the repo!
import Foundation
struct VPNProfile {
static let username: String = "<%= OPENVPN_USERNAME %>"
static let password: String = "<%= OPENVPN_PASSWORD %>"
static let configuration: String = """
<% OPENVPN_CONFIGURATION.each_line do |line| %>
<%= line %>
<% end %>
"""
static let remoteHost: String = "<%= OPENVPN_REMOTE_HOST %>"
static let remotePort: Int = <%= OPENVPN_REMOTE_PORT %>
}