File tree Expand file tree Collapse file tree 3 files changed +28
-0
lines changed
core/src/main/java/com/github/kr328/clash/core/model
java/com/github/kr328/clash/design Expand file tree Collapse file tree 3 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,9 @@ data class ConfigurationOverride(
4747 @SerialName(" external-controller-tls" )
4848 var externalControllerTLS : String? = null ,
4949
50+ @SerialName(" external-controller-cors" )
51+ var externalControllerCors : ExternalControllerCors = ExternalControllerCors (),
52+
5053 @SerialName(" secret" )
5154 var secret : String? = null ,
5255
@@ -210,6 +213,15 @@ data class ConfigurationOverride(
210213 var geosite : String? = null ,
211214 )
212215
216+ @Serializable
217+ data class ExternalControllerCors (
218+ @SerialName(" allow-origins" )
219+ var allowOrigins : List <String >? = null ,
220+
221+ @SerialName(" allow-private-network" )
222+ var allowPrivateNetwork : Boolean? = null ,
223+ )
224+
213225 override fun writeToParcel (parcel : Parcel , flags : Int ) {
214226 Parcelizer .encodeToParcel(serializer(), parcel, this )
215227 }
Original file line number Diff line number Diff line change @@ -157,6 +157,20 @@ class OverrideSettingsDesign(
157157 empty = R .string.default_
158158 )
159159
160+ editableTextList(
161+ value = configuration.externalControllerCors::allowOrigins,
162+ adapter = TextAdapter .String ,
163+ title = R .string.allow_origins,
164+ placeholder = R .string.dont_modify,
165+ )
166+
167+ selectableList(
168+ value = configuration.externalControllerCors::allowPrivateNetwork,
169+ values = booleanValues,
170+ valuesText = booleanValuesText,
171+ title = R .string.allow_private_network,
172+ )
173+
160174 editableText(
161175 value = configuration::secret,
162176 adapter = NullableTextAdapter .String ,
Original file line number Diff line number Diff line change 150150 <string name =" ipv6" >IPv6</string >
151151 <string name =" external_controller" >External Controller</string >
152152 <string name =" external_controller_tls" >External Controller TLS</string >
153+ <string name =" allow_origins" >External Controller Allow Origins</string >
154+ <string name =" allow_private_network" >External Controller Allow Private Network</string >
153155 <string name =" secret" >Secret</string >
154156 <string name =" hosts" >Hosts</string >
155157 <string name =" _new" >New</string >
You can’t perform that action at this time.
0 commit comments