پنل تحت وب مدیریت V2ray و ساخت کاربر و مدیریت سرور
mkdir x-ui && cd x-ui
docker run -itd --network=host \
-v $PWD/db/:/etc/x-ui/ \
-v $PWD/cert/:/root/cert/ \
@propertyWrapper | |
struct Storage<T: AppStorageConvertible>: RawRepresentable { | |
var rawValue: String { wrappedValue.storedValue } | |
var wrappedValue: T | |
init?(rawValue: String) { | |
guard let value = T.init(rawValue) else { return nil } | |
self.wrappedValue = value | |
} | |
init(wrappedValue: T) { |
#!/bin/bash | |
set -e | |
# !!!ONLY FOR MACOS!!! | |
# This script helps you to bypass VPN for specific CIDRs and domain names by adding a direct route to the default gateway for them. | |
# It also can be used to setup a killswitch. When killswitch is enabled, Only IP traffic to the VPN server (and other bypassed CIDRs) is allowed, All other packets would be dropped. | |
# Killswitch is powered by MacOS internal packet filter (PF) firewall. | |
# How to use? |
// | |
// MapViewController.swift | |
// | |
// Created by Tadeh Alexani on 7/14/19. | |
// Copyright © 2019 Tadeh Alexani. All rights reserved. | |
// | |
import UIKit | |
import GoogleMaps |
public extension UIDevice { | |
enum DeviceModelName: String { | |
case undefined | |
case iPodTouch5 | |
case iPodTouch6 | |
case iPhone4 | |
case iPhone4s | |
case iPhone5 |
import UIKit | |
extension UIImageView { | |
func addCircleGradiendBorder(_ width: CGFloat) { | |
let gradient = CAGradientLayer() | |
gradient.frame = CGRect(origin: CGPoint.zero, size: bounds.size) | |
let colors: [CGColor] = [UIColor.supSoftGreenThree.cgColor, UIColor.supSoftGreenTwo.cgColor, | |
UIColor.supSoftGreen.cgColor, UIColor.supTea.cgColor, | |
UIColor.supAquaMarineTwo.cgColor, UIColor.supAquaMarineThree.cgColor, |
// | |
// ViewController.swift | |
// Upload Image Example | |
// | |
import UIKit | |
import Alamofire | |
class ViewController: UIViewController, UIImagePickerControllerDelegate, UINavigationControllerDelegate { |
// | |
// RecordAudioViewController.swift | |
// Samples | |
// | |
// Created by VikasK on 11/02/19. | |
// Copyright © 2019 Vikaskore Software. All rights reserved. | |
// | |
import UIKit | |
import AVFoundation |
func downloadAndSaveAudioFile(_ audioFile: String, completion: @escaping (String) -> Void) { | |
//Create directory if not present | |
let paths = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.libraryDirectory, FileManager.SearchPathDomainMask.userDomainMask, true) | |
let documentDirectory = paths.first! as NSString | |
let soundDirPathString = documentDirectory.appendingPathComponent("Sounds") | |
do { | |
try FileManager.default.createDirectory(atPath: soundDirPathString, withIntermediateDirectories: true, attributes:nil) | |
print("directory created at \(soundDirPathString)") |
// | |
// This program is free software. It comes without any warranty, to | |
// the extent permitted by applicable law. You can redistribute it | |
// and/or modify it under the terms of the Do What The Fuck You Want | |
// To Public License, Version 2, as published by Sam Hocevar. See | |
// | |
// http://sam.zoy.org/wtfpl/COPYING | |
// | |
// for more details. | |
// |