Class: OPNsenseAPI::Core::Proxy::Settings

Inherits:
Object
  • Object
show all
Includes:
OPNsenseAPI::Core
Defined in:
lib/opnsense_api/core/proxy/settings.rb

Overview

Constant Summary collapse

BASE_PATH =
'/proxy/settings'

Instance Method Summary collapse

Methods included from OPNsenseAPI::Core

#initialize

Instance Method Details

#add_pac_match(body = {}) ⇒ Object



27
28
29
# File 'lib/opnsense_api/core/proxy/settings.rb', line 27

def add_pac_match(body = {})
  @client.post("#{BASE_PATH}/addPACMatch", body)
end

#add_pac_proxy(body = {}) ⇒ Object



31
32
33
# File 'lib/opnsense_api/core/proxy/settings.rb', line 31

def add_pac_proxy(body = {})
  @client.post("#{BASE_PATH}/addPACProxy", body)
end

#add_pac_rule(body = {}) ⇒ Object



35
36
37
# File 'lib/opnsense_api/core/proxy/settings.rb', line 35

def add_pac_rule(body = {})
  @client.post("#{BASE_PATH}/addPACRule", body)
end

#add_remote_blacklist(body = {}) ⇒ Object



39
40
41
# File 'lib/opnsense_api/core/proxy/settings.rb', line 39

def add_remote_blacklist(body = {})
  @client.post("#{BASE_PATH}/addRemoteBlacklist", body)
end

#del_pac_match(body = {}, uuid:) ⇒ Object



43
44
45
# File 'lib/opnsense_api/core/proxy/settings.rb', line 43

def del_pac_match(body = {}, uuid:)
  @client.post("#{BASE_PATH}/delPACMatch/#{uuid}", body)
end

#del_pac_proxy(body = {}, uuid:) ⇒ Object



47
48
49
# File 'lib/opnsense_api/core/proxy/settings.rb', line 47

def del_pac_proxy(body = {}, uuid:)
  @client.post("#{BASE_PATH}/delPACProxy/#{uuid}", body)
end

#del_pac_rule(body = {}, uuid:) ⇒ Object



51
52
53
# File 'lib/opnsense_api/core/proxy/settings.rb', line 51

def del_pac_rule(body = {}, uuid:)
  @client.post("#{BASE_PATH}/delPACRule/#{uuid}", body)
end

#del_remote_blacklist(body = {}, uuid:) ⇒ Object



55
56
57
# File 'lib/opnsense_api/core/proxy/settings.rb', line 55

def del_remote_blacklist(body = {}, uuid:)
  @client.post("#{BASE_PATH}/delRemoteBlacklist/#{uuid}", body)
end

#fetch_rb_cron(body = {}) ⇒ Object



59
60
61
# File 'lib/opnsense_api/core/proxy/settings.rb', line 59

def fetch_rb_cron(body = {})
  @client.post("#{BASE_PATH}/fetchRBCron", body)
end

#get(params = {}) ⇒ Object



63
64
65
# File 'lib/opnsense_api/core/proxy/settings.rb', line 63

def get(params = {})
  @client.get("#{BASE_PATH}/get", params)
end

#get_pac_match(params = {}, uuid: nil) ⇒ Object



67
68
69
# File 'lib/opnsense_api/core/proxy/settings.rb', line 67

def get_pac_match(params = {}, uuid: nil)
  @client.get("#{BASE_PATH}/getPACMatch/#{uuid}", params)
end

#get_pac_proxy(params = {}, uuid: nil) ⇒ Object



71
72
73
# File 'lib/opnsense_api/core/proxy/settings.rb', line 71

def get_pac_proxy(params = {}, uuid: nil)
  @client.get("#{BASE_PATH}/getPACProxy/#{uuid}", params)
end

#get_pac_rule(params = {}, uuid: nil) ⇒ Object



75
76
77
# File 'lib/opnsense_api/core/proxy/settings.rb', line 75

def get_pac_rule(params = {}, uuid: nil)
  @client.get("#{BASE_PATH}/getPACRule/#{uuid}", params)
end

#get_remote_blacklist(params = {}, uuid: nil) ⇒ Object



79
80
81
# File 'lib/opnsense_api/core/proxy/settings.rb', line 79

def get_remote_blacklist(params = {}, uuid: nil)
  @client.get("#{BASE_PATH}/getRemoteBlacklist/#{uuid}", params)
end

#search_pac_match(body = {}) ⇒ Object



83
84
85
# File 'lib/opnsense_api/core/proxy/settings.rb', line 83

def search_pac_match(body = {})
  @client.post("#{BASE_PATH}/searchPACMatch", body)
end

#search_pac_proxy(body = {}) ⇒ Object



87
88
89
# File 'lib/opnsense_api/core/proxy/settings.rb', line 87

def search_pac_proxy(body = {})
  @client.post("#{BASE_PATH}/searchPACProxy", body)
end

#search_pac_rule(body = {}) ⇒ Object



91
92
93
# File 'lib/opnsense_api/core/proxy/settings.rb', line 91

def search_pac_rule(body = {})
  @client.post("#{BASE_PATH}/searchPACRule", body)
end

#search_remote_blacklists(body = {}) ⇒ Object



95
96
97
# File 'lib/opnsense_api/core/proxy/settings.rb', line 95

def search_remote_blacklists(body = {})
  @client.post("#{BASE_PATH}/searchRemoteBlacklists", body)
end

#set(body = {}) ⇒ Object



99
100
101
# File 'lib/opnsense_api/core/proxy/settings.rb', line 99

def set(body = {})
  @client.post("#{BASE_PATH}/set", body)
end

#set_pac_match(body = {}, uuid:) ⇒ Object



103
104
105
# File 'lib/opnsense_api/core/proxy/settings.rb', line 103

def set_pac_match(body = {}, uuid:)
  @client.post("#{BASE_PATH}/setPACMatch/#{uuid}", body)
end

#set_pac_proxy(body = {}, uuid:) ⇒ Object



107
108
109
# File 'lib/opnsense_api/core/proxy/settings.rb', line 107

def set_pac_proxy(body = {}, uuid:)
  @client.post("#{BASE_PATH}/setPACProxy/#{uuid}", body)
end

#set_pac_rule(body = {}, uuid:) ⇒ Object



111
112
113
# File 'lib/opnsense_api/core/proxy/settings.rb', line 111

def set_pac_rule(body = {}, uuid:)
  @client.post("#{BASE_PATH}/setPACRule/#{uuid}", body)
end

#set_remote_blacklist(body = {}, uuid:) ⇒ Object



115
116
117
# File 'lib/opnsense_api/core/proxy/settings.rb', line 115

def set_remote_blacklist(body = {}, uuid:)
  @client.post("#{BASE_PATH}/setRemoteBlacklist/#{uuid}", body)
end

#toggle_pac_rule(body = {}, uuid:) ⇒ Object



119
120
121
# File 'lib/opnsense_api/core/proxy/settings.rb', line 119

def toggle_pac_rule(body = {}, uuid:)
  @client.post("#{BASE_PATH}/togglePACRule/#{uuid}", body)
end

#toggle_remote_blacklist(body = {}, uuid:) ⇒ Object



123
124
125
# File 'lib/opnsense_api/core/proxy/settings.rb', line 123

def toggle_remote_blacklist(body = {}, uuid:)
  @client.post("#{BASE_PATH}/toggleRemoteBlacklist/#{uuid}", body)
end