Posted on Leave a comment

Proxy Provider

What is a Proxy Provider?

A Proxy Provider is an engine used to determine which proxy is used for the current network flow.

In LanceX, the Proxy Provider chooses a proxy exclusively based on a Regular Expression. This allows for dynamic updates when adding or removing proxies.

Additionally, a Proxy Provider can be embedded within another Proxy Provider, forming a tree map structure.

What are the types of Proxy Provider?

There are four types of Proxy Provider:

  1. select: This type allows manual selection of a proxy. However, please note that it may not be accurate if your proxies change.
  2. fallback: This type selects proxies in a sequential order. If the current proxy is down or times out, the next one in line will be used.
  3. load_balance: This type efficiently distributes incoming network traffic across a group of proxies.
  4. url-test: This type selects the proxy to be used by benchmarking the speed to a specific URL.

How to set Proxy Provider?

There are two ways to set Proxy Provider:

  1. You can set it globally in Rule > Advance > Default Proxy Parameter. All routes matching PROXY will use the Proxy Provider. Please note that if you set this, the proxy you selected in Proxy View will not affect the connection, and the proxy details in the Control Panel will also change based on the Proxy Provider results.
  2. You can also set it for individual rules. When you change a rule’s target to PROXY, you can choose a Proxy Provider.
Posted on Leave a comment

What’s prepend script?

There is an option in Rule -> Advance named Prepend Script. The script you put in will be triggered together with other scripts each time.

So you can:

  • Add some code to debug.
  • Enhance the script ability.
  • Add some util libraries.
  • Although we support most of the APIs, some of the scripts use global variables to check the App type, so we can pretend as other runtime, for example, Rocket
Posted on 1 Comment

Where can I buy …?

Where can I buy LanceX?

The only way to purchase it is from the Apple Store.

Where can I buy a server?

Please seek suggestions from people in your country. The situation varies between countries, and the servers suggested or provided by others may not meet your specific requirements. Of course, if possible, building it yourself is always a good option.

Posted on Leave a comment

Scripting

You can use JavaScript to extend the ability of LanceX.

Public API

$done() function

Since all scripts run asynchronously, $done() should be called to indicate completion, even for scripts that do not require results. Otherwise, the script will print a warning due to a timeout.

Basic Information

  • $lancex

The object means that you are in the environment of LanceX.

Persistent Store

  • $persistentStore.write(data<String>, [key<String>])

Save data permanently. Only a string is allowed

  • $persistentStore.read([key<String>])

Get the saved data. Return a string or null.

Http Request

  • $httpClient.post(URL<String> or options<Object>, callback<Function>)

Start an HTTP POST request. The first parameter can be a URL or object. An example object may look like that.

{
    url: "http://www.example.com/",
    headers: {
        Content-Type: "application/json"
    },
    body: "{}",
    timeout: 5,
    callback: callback(error, response, data) {

    }
}

The url is always required. body can be a string or object. When presenting an object, it is encoded to JSON string, and the Content-Type is set to application/json automatically.

Similar function: $httpClient.get, $httpClient.put$httpClient.delete, $httpClient.head, $httpClient.options, $httpClient.patch.

Utilities

  • console.log(message<String>)

Log to LanceX logfile. Similar function: console.warn, console.error, console.info.

  • setTimeout(function[, delay])

Same as the setTimeout in browsers. Similar function: setInterval.

  • $notification.post(title<String>, subtitle<String>, body<String>)

Post a notification. Please turn on Allow Notifications before using it.

Posted on Leave a comment

Priority of Rules

I have a lot of rules, what is their priority?

Module first, domain directives have the following priority: DOMAIN > DOMAIN-SUFFIX > DOMAIN-KEYWORD. IP directives have the following priority: CIDR > GEO IP. If multiple rules are hit at the same time, for performance reasons, the current strategy is to select one at random.

Posted on Leave a comment

How to feedback

Telegram

  • Address: https://t.me/lancex_app
  • Supported languages: English, Chinese
  • Reply interval: within 24 hours or never
  • Recommendation: It is more urgent, and you want to get feedback immediately. You may not get reply if there are a lot of messages.

Email

  • Address: shadowboat#outlook.com
  • Supported languages: English, Chinese
  • Reply interval: mostly within one week
  • Recommendation: It is more important, and you want to be sure to get an answer.
Posted on Leave a comment

Factors affecting the speed

Let’s talk about the factors that affect the transmission speed

1. Experiment Setting

Turn off all experiment settings, experiment settings may make VPN not only slow but unstable.

2. Protocol

The more complex the protocol, the slower the speed.

Protocol complexity: socks5 < ss < http < trojan < vless < vmess.

3. Protocol’s Method

Complex encryption method can slow things down, and there is no hardware acceleration(iOS13+) except AES256GCM, AES128GCM, ChaCha20-Poly1305.

4. TLS v1.3

There is currently no hardware acceleration for TLS v1.3, so if your server supports TLS v1.2, turn v1.3 off.

As of 2.2.14, TLS 1.3 becomes automatic detection

5. Transport and Obfuscation

Transport or obfuscation means packing the data into anthoer format, so it may use more memory and cpu.

6. Mux

Multiplexers like VMess Mux and H2 Mux both use fewer channels for communication, so may slow down the transfer speed.

7. Mode

Test in direct or proxy mode as you cannot determine the channel of the data. For example, there is a rule “GEOIP”, if you visit an address with multiple IPs, some hit and some don’t.

8. XTLS

Does not perform well on mobile, better not use it.

9. Current network and network of target node

If the mobile cannot reach full load, then the main influencing factor is the network